Welcome back to round #2 of PHP Core Roundup, where weβll make regular updates on the improvements made to PHP by the PHP Foundation and other contributors. In this second one in the series, we have news about the upcoming PHP 8.2 release, some new RFCs accepted, voted, and being discussed, and some further improvements to PHP made in the past few weeks.
You donβt necessarily have to be a PHP Foundation backer to follow the PHP Roundup. Weβll be publishing the posts on our website, and you can subscribe to a newsletter:
The PHP Foundation currently supports six part-time PHP contributors who work on both 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.
For each major version of PHP (such as PHP 7.4, 8.0, 8.1, and 8.2), PHP core developers vote and elect one or two release managers along with a veteran PHP core developer who has been a release manager before.
PHP Release managers are responsible for tagging and creating PHP releases throughout the lifecycle of that PHP version, including the alpha/beta/RC releases, and security releases as well as regular patch versions. Lasting for about three and half years, the release managers have the final say last-minute RFCs as well.
For the upcoming PHP 8.2, we had 7 candidates, with Ben Ramsey, one of the PHP 8.1 release managers stepping in as the veteran release manager. After a poll that ended on May 18, Sergey Panteleev and Pierrick Charron were elected as rookie release managers.
Congratulations Sergey, Pierrick, and Ben on being PHP 8.2 release managers!
Every major change to PHP is discussed and implemented with the consensus of the PHP community. Each RFC proposes a set of changes, and the PHP Internals community holds a vote that lasts two weeks by default.
Things marked with π are done by the PHP Foundation team.
Implemented: Deprecate ${} string interpolation π
RFC by Ilija Tovilo was accepted with 31:1 votes in favor, and is now implemented in PHP core. This RFC proposes to deprecate string interpolation with ${var}
and ${expr}
patterns with {$var}
and {${expr}}
patterns.
On top 1,000 most downloaded packages as per Packagist data, over 40 packages contained at least one occurrence of this now-deprecated pattern. Fixes are being made to the libraries, you can help out by testing your libraries and submitting pull-requests to the relevant repositories.
This RFC is likely to be followed up with another RFC vote to decide whether the deprecated string interpolation patterns should throw an error, or silently ignored in PHP 9.0
Learn more about this RFC on PHP.Watch.
Implemented: Readonly Classes π
MΓ‘tΓ© Kocsis follows up PHP 8.1 readonly properties feature with support for marking the entire class as readonly in this new RFC. In PHP 8.2, all properties (must be typed) of the class will be implicitly readonly if the class is declared as readonly.
Learn more about this RFC on PHP.Watch.
Accepted: MySQLi Execute Query
RFC by Kamil Tekiela and Craig Francis was accepted unanimously with 24 votes. This RFC proposes to add a new mysqli_execute_query
function to the MySQLi extension that greatly simplifies the multiple function calls it required to prepare, bind parameters, execute, and retrieve data with mysqli_prepare/execute/stement_get_result functions.
Learn more about this RFC on PHP.Watch.
Accepted: Undefined Property Error Promotion
RFC by Mark Randall proposes to throw an error on undefined class property access, similar to the now accepted changes with undefined variables. Notably, PHP 8.2 already emits deprecation notices on dynamic property creation (with a few exceptions).
Under Discussion: Expand deprecation notice scope for partially supported callables
Juliette Reinders Folmer follows up on the Deprecate partially supported callables RFC (implemented in PHP 8.2) to widen the scope of the deprecation to include is_callable function and when type verification is executed on the callable type.
Learn more about this RFC on PHP Internals News Podcast hosted by Derick Rethans.
Under Discussion: Stricter implicit boolean coercions
RFC by Andreas Leathley is currently under discussion, which discovers ways how various types are coerced with boolean values. A lengthy discussion is underway.
Under Discussion: Fetching properties in constant expressions π
RFC by Ilija Tovilo proposes adding support for fetching properties in constant expressions using the ->
operator. This will make it possible to fetch the name and value of enums in constant expressions.
Some of the minor changes made to PHP are first made as a pull request to the PHP GitHub project, and if deemed acceptable by PHP core maintainers, they are merged without going through a formal RFC process. We have automatic tests in place to flag PRs that break existing functionality. The majority of the minor changes from the community are made through PRs.
CURLOPT_MAXFILESIZE_LARGE
and CURLOPT_XFERINFOFUNCTION
options in PR #7823 and #8557 by David Carlier.ReflectionMethod::hasPrototype()
in PR #8487 by Ollie Read.ReflectionFunction::isAnonymous()
in PR #8499 by Nicolas Grekas.TCP_NOTSENT_LOWAT
and SO_MEMINFO
options in PR #8559 and commit 2410e378 by David Carlier.idate()
now accepts format specifiers "N" (ISO Day-of-Week) and "o" (ISO Year) in commit 12702a20 by Pavel Djundik.ext/zip
as shared library by default on Windows in PR #8549 by Christoph M. Becker.stream_wrapper_unregister()
memory leak in PR #8587 by Ilija Tovilo π.ini_get()
could be optimized-out by the optimizer in PR #8507 by Arnaud Le Blanc π.dl()β
-ed extension in ZTS in PR #8435 by Arnaud Le Blanc π.INIT_METHOD_CALL
when the method may be modified PR #8600 by Arnaud Le Blanc π.ftp_mdtm
in PR #8259 by Jihwan Kim.parse_url()
can not recognize port without scheme in PR #7844 by @pandaLIU.Enum::from
/tryFrom
when type coercion occurs in internal enums in PR #8633 by Ilija Tovilo π.DateInterval::createFromDateString
does not throw if non-relative items are present in PR #8458.DateTime::createFromFormat
and related functions.DateTime
instances created using reflection in PR #8497.DatePeriod
iterations in PR #8550.timezone_open
accepts invalid timezone string argument in PR #8595.Apart from the highlighted changes above, there have been more improvements and fixes from Alex Dowad, Nikita Popov, Dmitry Stogov, and more contributors.
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.