The WordPress coreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. development team builds WordPress! Follow this site for general updates, status reports, and the occasional code debate. There’s lots of ways to contribute:
Found a bugbugA bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority.?Create a ticket in the bug tracker.
PHPPHPThe web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher 7.3 is in the final stages of its release cycle. As of the publish date of this post, version 7.3.0RC3 has been released and the final release of PHP 7.3.0 is scheduled for December 13th.
As the changes in PHP 7.3 were solidified earlier this year, contributors to WordPress CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. worked to identify compatibility issues within the codebase. Overall, the changes needed to declare full PHP 7.3 support are minor, and are all being made.
WordPress aims to fully support PHP 7.3 in its next release.
Here is a breakdown of the changes in PHP 7.3 that pluginPluginA plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party and theme developers need to be aware of and should accommodate in their code.
New Function: is_countable()
It is considered good practice to validate variables before using them. Parameters passed to functions may not be of the variable type expected. Similarly, the type of variable returned by a filterFilterFilters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. may have changed due to incorrect usage of the filter by plugins or themes.
In WordPress 4.9.6, two polyfill functions were introduced to help developers follow this best practice regardless of the PHP version a site is running. Using these functions in your code will ensure warnings are not triggered when sites are upgraded to newer versions of PHP.
compact() is a function in PHP that creates an array of values from a list of variable names. If an undefined variable is specified, the resulting array will not contain an index for that variable. This could cause some unexpected behavior due to missing indexes and some scenarios that are difficult to debug.
Starting in PHP 7.3, a notice will be triggered when an undefined variable is passed to compact() to help with identify such situations.
switch() and continue
In PHP, applying continue to a switch() statement causes the same behavior as break. However, in other languages, using continue within switch() statements will continue the surrounding loopLoopThe Loop is PHP code used by WordPress to display posts. Using The Loop, WordPress processes each post to be displayed on the current page, and formats it according to how it matches specified criteria within The Loop tags. Any HTML or PHP code in the Loop will be processed on each post. https://codex.wordpress.org/The_Loop. instead (the equivalent of continue 2).
while ($foo) {
switch ($foo) {
case "bar":
continue; // This now throws a warning.
break; // Use this for equivalent behavior.
continue 2; // No warning, correctly targets the while loop.
}
}
Even as WordPress Core continues to expand its support for new versions of PHP, there is no intention of abandoning support for older versions until usage numbers show that the impact on users will be minimal. If you wish to help with this, an effort to decrease the usage numbers for older versions of PHP is being lead by the #core-php team through the servehappy initiative.
WordPress continues to encourage all users to run the latest and greatest versions of PHP, including PHP7.3 upon its official release.