an RFC Basically a form to carefully fill out A reference implementation helps, you can find help with that Discuss on the mailing list Vote Technical review on GitHub
Kocsis, Niels Dossche, Tim Düsterhus RFC 3986: Defines URIs WHATWG: Specifies how browsers should treat URLs Web Hypertext Application Technology Working Group https://wiki.php.net/rfc/url_parsing_api
Dusch Implementation & Review: Tim Düsterhus, Volker Dusch, Ilija Tovilo, Dmitry Stogov Following the last RFC: https://wiki.php.net/rfc/fcc_in_const_expr final class LogEntry { public string $message; #[Serialize\Custom(self::myMethod(...))] public string $severity; }
found" static analysis. class MyTest { // Before #[DataProvider('dataProvider')] // After #[DataProvider(self::dataProvider(...))] public testThing($arg1, $arg2, $arg3): void { } }
Peter Banyard, Arnaud Le Blanc, Tim Düsterhus Trying to make function call chains more readable. https://wiki.php.net/rfc/pipe-operator-v3 $greeting = " Hello World "; $length = $greeting |> trim(...) |> strlen(...); 2 3 4 5 $greeting = " Hello World "; $length = strlen(trim($greeting)); 2 3
Exceptions work by leaving the whole pipe. public function totalCostCalculator(Price $listPrice): Price { return $price |> $this->addShipping(...) |> $this->applyCoupons(...) |> $this->applyMemberDiscounts(...) |> $this->addTax(...) }
Jakub Zelenka Remember your CLI and web server settings might be different! ➜ php --ini=diff Non-default INI settings: html_errors: "1" -> "0" implicit_flush: "0" -> "1" max_execution_time: "30" -> "0"
\ -d opcache.opt_debug_level=0x20000 --ini=diff If there is no output, something is missing. # We've been missing: zend_extension=opcache.so # ... except with PHP 8.5 that's solved as well
Tovilo Implementation & Review: Arnaud Le Blanc, Niels Dossche, Dmitry Stogov, Tim Düsterhus Statically built into PHP - Easier "single binary" setups. Simplified production setups. No more "is OPcache available?" checks. https://wiki.php.net/rfc/make_opcache_required
Norris, Niels Dossche, Dmitry Stogov, Gina Peter Banyard, Jakub Zelenka, Calvin Buckley, Bob Weinand, Derick Rethans, Ilija Tovilo, Tim Düsterhus, Remi Collet We already had stack traces for undefined functions, classes and failed requires. Now we have them for: Timeouts Out of Memory errors Class redefinitions https://wiki.php.net/rfc/error_backtraces_v2
Maximum execution time of 1 second exceeded in... // Fatal error: Maximum execution time of 1 second exceeded in... // Stack trace: // #0 .../fatal-error-backtrace.php(4): foo() // #1 .../fatal-error-backtrace.php(11): bar() // #2 .../fatal-error-backtrace.php(11): {closure:/.../fatal-error-backtrace.php:11}() // #3 {main}
Düsterhus, Niels Dossche, Ilija Tovilo, Dmitry Stogov Enforce return values to be used or explicitly discarded https://wiki.php.net/rfc/marking_return_value_as_important function addOneHour($x) { /* Missing return */ $x->modify('+1 hours'); } $x = new DateTimeImmutable('now'); addOneHour($x); // Warning: The return value of method DateTimeImmutable::modify() // should either be used or intentionally ignored by casting // it as (void), as DateTimeImmutable::modify() // does not modify the object itself // Missing assignment here undetected as addOneHour doesn't have #[\
#[\NoDiscard('as the file is not converted in place')] public function convert(File $file): File { return new File(); } } $converter = new FileFormatConverter(); // Warning: The return value of method // FileFormatConverter::convert() should either be used // or intentionally ignored by casting it as (void), // as the file is not converted in place in ... $converter->convert(new File()); // No warning: (void)$converter->convert(new File()); 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Norris, Niels Dossche, Gina Peter Banyard, Tim Düsterhus, Máté Kocsis Connection reuse between curl requests across script runs (of the same worker process). https://wiki.php.net/rfc/curl_share_persistence_improvement
Dossche, Tim Düsterhus https://wiki.php.net/rfc/array_first_last // A common, stable way to do this before: foreach ($array as $first) { break; } // Works, but changes the array pointer: $first = reset($array); // Takes up additional memory: $first = array_values($array)[0];
voted in with 35:0. Discussion was short Just makes sense This is to say: If you have an array_first grade improvement. Please build it! Let me know if you need help with the process :)
Volker Dusch, Tim Düsterhus, Niels Dossche, Ilija Tovilo Rounds out the readonly/immutable feature set Avoids having to cram a lot of code in __clone https://wiki.php.net/rfc/clone_with_v2
Jakub Zelenka, Gina Peter Banyard, Tim Düsterhus, Christoph M. Becker, Ayesh Karunaratne Where does your PHP come from? The PHP project only ships source code. Useful for bug reports and debugging. docker run -it --rm php:8.5-rc-cli \ php -r 'echo PHP_BUILD_DATE, PHP_EOL, PHP_BUILD_PROVIDER;' Oct 21 2025 01:23:19 https://github.com/docker-library/php
the PHP Foundation A new single binary runtime for PHP, using Caddy Think Apache with mod_php but with Caddy DX HTTP 103 support, static binaries, worker mode, etc php-fpm continues to be a first class citizen https://frankenphp.dev
great care to ensure minimal impact. Proving time windows for migrations. Nothing gets removed 8.5! Removing certain engine behaviors with PHP 9 allows for optimizations and speedups!
the year. Recent releases have had one collection RFC. Great effort by Gina Peter Banyard managing all that. One discussion, lots of votes, keeps things focused, moving and effective. https://wiki.php.net/rfc/deprecations_php_8_5
considered a BC break. Don't write code that breaks because of deprecations. Throwing in error handlers for deprecations means you own the upgrade/BC path.
for reasonable setups php -d disable_classes=Exception -r 'throw new Exception();' Warning: Exception() has been disabled for security reasons in... Fatal error: Uncaught Error: Cannot throw objects that do not implement Throwable in ... Stack trace: #0 {main} thrown in Command line code on line 1 https://wiki.php.net/rfc/deprecations_php_8_5#remove_disable_classes_ini_setting
So cleanup now happens automatically. All manual resource "freeing" functions can go now. finfo_close() xml_parser_free() curl_close() curl_share_close() imagedestroy() https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_no- op_functions_from_the_resource_to_object_conversion