Clone with v2
ImplementedLets clone() take an array of properties to change on the copy, so you can update readonly properties in with-er methods.
Last activity
Follow the proposals shaping the next version of PHP.
Lets clone() take an array of properties to change on the copy, so you can update readonly properties in with-er methods.
Last activity
Adds str_icontains(), a case-insensitive version of str_contains() that folds ASCII letters only.
Last activity
Lets you mark a promoted constructor parameter as final, making the promoted property final without extra boilerplate.
Last activity
Adds ? and ... placeholders to function calls, so passing only some arguments returns a closure that takes the rest later.
Last activity
Adds an official policy for how PHP extensions name, structure and throw exceptions, based on the ext/random design.
Last activity
Adds the |> pipe operator, which passes the value on its left as the single argument to the callable on its right.
Last activity
Adds an always-on URI extension with Uri\Rfc3986\Uri and Uri\WhatWg\Url classes for standards-compliant URL parsing, instead of parse_url().
Last activity
Lets you declare classes and enums inside other classes, with public, protected or private visibility, referenced as Outer\Inner.
Last activity
Updates the PHP release policy to define BC breaks, clarify what each version type may change, and let most features land via pull request.
Last activity
Adds array_first() and array_last() to return an array's first and last values, or null when the array is empty.
Last activity
Lets interface and abstract methods use never as a parameter type, so implementations can pick any type, and uses it for BackedEnum::from().
Last activity
Adds grapheme_levenshtein() to intl, which measures edit distance by visible characters so combined accents and variation selectors compare right.
Last activity
Sets out which backward compatibility breaks are allowed in a PHP minor release, and which have to wait for a major one.
Last activity
Makes sort(), usort(), shuffle(), array_walk() and similar functions return the sorted array instead of always returning true.
Last activity
Lets a class mark an interface with ? in its implements list, so it only implements that interface if it exists.
Last activity
Adds get_error_handler() and get_exception_handler() so you can read the current handlers without setting and restoring them.
Last activity
Adds mb_levenshtein() to mbstring so the Levenshtein edit distance is counted in Unicode code points instead of bytes.
Last activity
Adds a #[\NoDiscard] attribute that warns when a call ignores a function's return value, plus a (void) cast to ignore it on purpose.
Last activity
Extends asymmetric visibility, like public private(set), to static properties.
Last activity
Adds a let() construct that scopes variables to a block and restores or unsets them when it ends, even if an exception is thrown.
Last activity