Welcome back to PHP Core Roundup, the sixth in the series. PHP Core Roundup summarizes the latest improvements, bug fixes, discussions, and proposals to PHP.
The PHP Foundation currently supports six part-time PHP contributors who work on maintenance and new features for PHP. Maintenance is not limited to fixing bugs, but also includes work to reduce technical debt, making life easier for everyone working on PHP. The contributors funded by the PHP Foundation collaborate with other contributors on code, documentation, and discussions.
We publish the posts on our website, and you can subscribe to a newsletter; You don’t necessarily have to be a PHP Foundation backer to follow PHP Core Roundup.
September was a slow month, given that PHP 8.2 reached its feature-freeze, and most of the work is now focused on getting PHP 8.2 ready for its general availability, scheduled for November 24th.
Nikita Popov recently tagged three new releases of the nikic/PHP-Parser library with support for PHP 8.2 features and syntax. PHP-Parser is used as the underlying PHP parser for several PHP static analyzers, and you can expect many PHP tools to support new PHP 8.2 syntax in the coming weeks.
Although PHP 8.2 is still being ironed out, there are some discussions and even an RFC currently being voted for proposed changes in PHP 8.3 (scheduled for the end of 2023!).
Deprecations for PHP 8.3 RFC is currently in draft, which stands to track ideas on deprecating certain features. So far those are related to the
NumberFormatter class, and a few functions related to Random Number Generators (RNG).
Furthermore, there is an RFC currently under vote to add a new function named
json_validate(), that validates a given JSON string without the memory overhead of otherwise decoding the JSON string into memory.
Changes and improvements to PHP are discussed, reported, and voted on by the PHP Foundation Team, the PHP development team, and contributors. Bug reports are made to the PHP issue tracker, changes are discussed in mailing lists, minor code changes are proposed as pull requests, and major changes are discussed in detail and voted on as PHP RFCs. Documentation and the php.net web site changes are also discussed and improved at their relevant Git repositories on GitHub.
Hundreds of awesome PHP contributors put their efforts into improvements to the PHP code base, documentation, and the php.net website. Here is a summary of some of the changes made by the people behind PHP. Things marked with 💜 are done by the PHP Foundation team.
Following are the RFCs and major pull-requests discussed, voted, and implemented since our last update.
RFC In Voting: json_validate
RFC by Juan Carlos Morales, to add a new
json_validate() function that returns whether the given string of JSON is a valid JSON. PHP’s
json_decode() function can emit errors or throw exceptions on strings with invalid JSON, but the proposed
json_validate function will be faster and more memory efficient because it does not attempt to build the data structures in memory, but merely validate the given string.
This RFC is currently under vote, and concludes on 7th of October. The responses have been overwhelmingly positive to add
json_validate to PHP 8.3.
RFC In Draft: Deprecations for PHP 8.3
RFC Christoph M. Becker and George Peter Banyard 💜 with suggestions from Tim Düsterhus and Go Kudo (so far!), that proposes a series of functionality/syntax to deprecate in PHP 8.3, and eventually remove in PHP 9.0.
Each proposed deprecation will be voted to determine if the deprecation makes it to PHP 8.3, but having a consolidated RFC eases the voting and discussions.
So far, the RFC proposes to deprecate the following:
str_shuffle()functions in favor of the
\Random\Randomizerclass introduced in PHP 8.2, or
random_bytes()functions available since PHP 7.0. Most of the applications can simply switch to
random_bytes(), and applications that rely on an existing Mersenne Twister sequence can use the scoped Mt19937 engine through the new
George P. Banyard 💜 is tracking the progress for PHP 8.2 related changes in php/doc-en#1803, and you can help too!
You can also help with other existing issues, a good starting point are issues marked as “good first issue” that George went and triaged in preparation for Hacktoberfest.
Derick has gone through all the datetime notes, and integrated them where needed, deleted where not.
Following are some changes that did not go through an RFC process because they are either planned, bug fixes, or progressive enhancements. There are automated unit and integration tests for each of these changes, the PHP core developers review all pull requests.
CONST_CSwhen registering constants in GH-9439 by Máté Kocsis 💜
local_pkdo not respect
open_basedirrestriction in 505e8d2a04 by Jakub Zelenka 💜
chacha20-poly1305AEAD support in 1407968891 by Jakub Zelenka 💜
openssl_cipher_key_lengthfunction in 35e2a25d83 by Jakub Zelenka 💜
libxml_get_external_entity_loader()in 11796229f2 by Tim Starling
libxml22.10.0 symbols in GH-9358 by Christoph M. Becker
PATCHrequest on a static resource in 7065a222b7 by Vedran Miletić
NEWSfor CLI built-in server changes in 5e9af0d0b0 by Jakub Zelenka 💜
ext/opcache/tests/jit/inc_obj_004.phptfailure introduced by fd74ee7e in ce42dcf483 by Dmitry Stogov
ksortbehaves incorrectly on arrays with mixed keys” in 725cb4e8ad by Christoph M. Becker
DateTime::getLastErrors()not returning false when no errors/warnings in 932586c426 by Derick Rethans 💜
gen_stubto avoid compile errors on duplicate function names in GH-9406 by Andreas Braun
zend/testaliases in ef21bbe66c by Máté Kocsis 💜
ext/zend_testalias functions in 8d78dce902 by Máté Kocsis 💜
debug_zval_dumpcheck for infinite recursion on the
*object*in GH-9448 by Tyson Andre
UPGRADINGentries for GH-9296 in 853181a14d by Christoph M. Becker
#[\SensitiveParameter]in c77bbf6fe5 by Tim Düsterhus
pcre.jiton Apple Silicon in GH-9279 by Niklas Keller
ext/random's randomizer tests in GH-9410 by Tim Düsterhus
ext/standardconstants in stubs in GH-9465, GH-9466, GH-9505, and GH-9467 by Máté Kocsis 💜
opcache.interned_strings_buffercausing shm corruption in GH-9260 by Arnaud Le Blanc 💜
ext/standard/config.m4in GH-9482 by Tim Düsterhus
sapi/cli/tests/017.phpton Windows, too in GH-9474 by Christoph M. Becker
phpinfo()for opcache in GH-9475 by Mikhail Galanin
php_info_print_table_headerfor actual column headers only in GH-9485 by Tim Düsterhus
zend_stringINI validators in GH-9328 by George Peter Banyard 💜
uspoof_check2UTF8call when available. in GH-9478 by David CARLIER
PDEATHSIGto kill cli-server workers if parent exists in GH-9476 by Ilija Tovilo 💜
eval'd code referring to incorrect class for static type in GH-9471 by Ilija Tovilo 💜
__getand property type inconsistency error message in GH-9436 by Ilija Tovilo 💜
MemorySanitizer: use-of-uninitialized-value warning introduced by 932586c4 in 8cdfffb753 by Derick Rethans 💜
NULL, but use by-ref instead in f799bc4eca by Derick Rethans 💜
zend_jit_trace_get_exit_addr()in GH-9097 by Arnaud Le Blanc 💜
PROGRESS_CACHE_SLOT()macro in 80315edd58 by George Peter Banyard 💜
(A&B)|Das a param should allow
D. Not just
Ain 9286101da4 by George Peter Banyard 💜
compact_literals.cin 6c4d24e4f0 by George Peter Banyard 💜
gen_stub.phpin 8b632749d7 by Máté Kocsis 💜
gh9259_003.phptas xfail with ASAN in e9a0d21a06 by Ilija Tovilo 💜
FG(user_stream_current_filename)at the end of request in d0b3096ff0 by Dmitry Stogov
ZEND_RC_MOD_CHECK()for thread local ini parser strings in 9af98cd465 by Ilija Tovilo 💜
_xml_add_to_info()in 0b8ad94b91 by George Peter Banyard 💜
_xml_decode_tag()as taking a
const XML_Char*in 6aef13402e by George Peter Banyard 💜
xml.cin 951bd74038 by George Peter Banyard 💜
oci_success_with_info.phpttest random failures in GH-9525 by Michael Voříšek
strtotimetranslates a date-time with DST/non-DST hour differently based on default timezone in e5b4624b8b by Derick Rethans 💜
constfor fixed API in f8b27c73c9 by Derick Rethans 💜
NEWSin 0f9351669b by Derick Rethans 💜
LIBZIP_VERSIONconstant def from stub in 946cdb8ad1 by Remi Collet
SplFixedArrayin 70ad93dd6e by Nikita Popov
ext/date/tests/gh-124.phpton ASAN in dbbb7427be by Ilija Tovilo 💜
file_cache_only=1in GH-9550 by Ilija Tovilo 💜
DEBUG_NTS_OPCACHEWithout interned strings" build in ac54bfb17c by Arnaud Le Blanc 💜
gcovin 3f1e9235e1 by Ilija Tovilo 💜
NULLin GH-9559 by Ilija Tovilo 💜
dl(mysqli)issue with OPcache on AppVeyor in GH-9557 by Christoph M. Becker
fileinfo: magic: Backport mime type support for
woff/woff2fonts in 34fa65a6c2 by Anatol Belski
SOCKET_EPROTOconstant missing since PHP 8.2 dev in GH-9575 by Christoph M. Becker
TEST_PHP_DIFF_CMDenv var is set in d7d6794f94 by Derick Rethans 💜
Randomizer::getBytes()in GH-9563 by Joshua Rüsweg
ENABLE_TEST_CLASScheck in 0b2fe40d23 by Nikita Popov
PS(mod_user_class_name)must not leak into next request in 3071d85a6b by Ilija Tovilo 💜
parse_url(): can not recognize port without scheme” in GH-9569 by Andy Postnikov
form) in GH-9609 by Christoph M. Becker
--repeat 2job to GitHub actions in 2cf7d70e53 by Ilija Tovilo 💜
libmysqlclientjob to GitHub actions in GH-9608 by Ilija Tovilo 💜
fileinfo: tests: Disable times sensitive tests on debug build in cab2f05f5a by Anatol Belski
travis_waitto travis for
test.shin 8c20ad1081 by Ilija Tovilo 💜
SA_ONSTACKin zend_sigaction in GH-9597 by Kévin Dunglas
FFI::addr()when referencing temporary pointer in GH-9601 by Ilija Tovilo 💜
CFLAGSfor community build in 12afd0cba8 by Ilija Tovilo 💜
init_fcallguards in ca93e48b77 by Dmitry Stogov
run-tests.phpfor explicitly given test cases in GH-9617 by Christoph M. Becker
bug81726.phptfor PHP 8.0 in GH-9621 by Christoph M. Becker
bug81726.phptfor PHP 8.0 in 809176dab0 by Christoph M. Becker
zend_tryto recover in case of memory overflow in 2568db287d by Dmitry Stogov
}in GH-9624 by Ilija Tovilo 💜
At PHP Foundation, we support, promote, and advance the PHP language. We financially support six part-time PHP core developers to contribute to the PHP project. You can help support PHP Foundation at OpenCollective.
A big thanks to all our sponsors — PHP Foundation is all of us!
A special mention goes to mailcoach.app for providing us with a platform for the newsletter.
Follow us on Twitter @ThePHPF to get the latest updates from the Foundation.
PHP Roundup is prepared by Ayesh Karunaratne from PHP.Watch, a source for PHP News, Articles, Upcoming Changes, and more.