PHP 8.5 — Pipes & platform tightening
Pipe operator `|>`, `#[\NoDiscard]`, closures in constant expressions, ext/uri, stricter filter/PDO/Opcache behavior.
Trace the language from PHP 5.3 through current PHP 8.x releases, with practical examples and migration checklists.
Pipe operator `|>`, `#[\NoDiscard]`, closures in constant expressions, ext/uri, stricter filter/PDO/Opcache behavior.
Property hooks, asymmetric visibility, lazy objects, new `Dom\*` API, `#[Deprecated]`, and deprecations to clear before the next jump.
`#[Override]`, typed class constants, `json_validate`, `str_increment` / `str_decrement`, and runtime fixes that show up under load.
Readonly classes, DNF types, standalone `null`/`false`/`true`, `#[SensitiveParameter]`, Random extension, dynamic property deprecations.
Enums, readonly properties, fibers, intersection types, first-class callables, and migration tightening vs 8.0.
Named arguments, match, attributes, JIT, union types, nullsafe `?->`, and stricter behavior across the standard library.
Typed properties, arrow functions, FFI, OPcache preloading, `__serialize` / `__unserialize`, and BC traps (typed props, password constants, extensions).
Flexible heredoc/nowdoc, trailing commas in calls, `JsonException`, `is_countable`, `array_key_first`/`last`, PCRE2, Argon2id—and subtle BC (ArrayAccess keys, references, `continue` in `switch`).
`object` hint, parameter type widening, Sodium in core, LDAP EXOP, addrinfo sockets—`count()`/`get_class(null)` warnings and mcrypt moved to PECL.
`?Type`, `void`, `iterable`, constant visibility, multi-catch, keyed `list()`—plus `ArgumentCountError`, session INI removals, and string offset BC.
Scalar & return types, `??` and `<=>`, anonymous classes, `Closure::call`, generators, `random_bytes`, filtered `unserialize`—and `Throwable`/BC from the 5.x era.
Variadic `...`, argument unpacking, `**` exponentiation, `use function`/`const`, constant expressions—last stop before PHP 7’s engine leap.
`yield` generators, `finally`, `password_hash` API, `array_column`, `ClassName::class`—and subtle `foreach`/`list()` BC worth regression-testing.
Traits, short array syntax `[]`, callable type hint, `$this` in closures, built-in web server—magic quotes & `register_globals` removed, `mysql` deprecated.
Namespaces, `use`, late static binding, closures, `goto`, NOWDOC, optional cycle GC, Phar—plus BC (new keywords, `ereg*` deprecated) on the road away from PHP 4 habits.