A closure variant for callbacks that run inside the function that defines them, with access to its variables.
Last activity
Follow the proposals shaping the next version of PHP.
A closure variant for callbacks that run inside the function that defines them, with access to its variables.
Last activity
Adds a #[NoSerialize] attribute that leaves a property out of serialize(), or forbids serializing a whole class.
Last activity
Makes closures declared in constant expressions serializable by referencing the code that declares them.
Last activity
Adds an opt-in mode where unqualified function and constant names stop falling back to the global namespace.
Last activity
Adds grapheme_mask() for masking sensitive data safely in multibyte and emoji-heavy strings.
Last activity
Adds ReflectionAttribute::getCurrent() so an attribute can find the element it is attached to.
Last activity
Adds friend classes that may access another class's protected members.
Last activity
Adds a using keyword and a ContextManager interface, borrowed from Python, that guarantee setup and cleanup around a block of code.
Last activity
Prevents instantiating and cloning the internal __PHP_Incomplete_Class.
Last activity
Adds optional crc-fast support to ext/hash for SIMD-accelerated CRC-32 and CRC-64, plus the CRC-64/NVME checksum AWS S3 uses.
Last activity
Lets partial function application fill in the object with this: ?, so DateTimeImmutable::format(this: ?, "c") works with array_map().
Last activity
Lets a parenthesized boolean expression end with a trailing &&, ||, and or or, the same way trailing commas already work.
Last activity
Deprecates lossy casts like (int) "123abc" ahead of a TypeError in PHP 9, and lets strict mode accept Stringable for string parameters.
Last activity
Adds a native values() method to backed enums that returns every backing value in declaration order, unless the enum defines its own.
Last activity
Adds an Encoding namespace with full RFC 4648 Base16, Base32 and Base64 support, plus Base58 and Base85.
Last activity
Adds private(namespace) visibility for methods and properties, so classes in the same namespace can share internals without making them public.
Last activity
Adds (?type) casts that let null pass through and (!type) casts that reject null, both throwing on malformed input like "123abc".
Last activity
Throws a catchable MemoryError for allocations that are obviously too large, instead of a fatal error.
Last activity
Allows the #[\Deprecated] attribute on interfaces.
Last activity
Adds a fallthrough; marker to switch and warns when a non-empty case falls through to the next one without it.
Last activity