[wp-hackers] PHP 5.3 stress tests with WordPress - expecting a lot of emitted warnings

Heiko Rabe heiko.rabe at code-styling.de
Tue Jul 21 01:07:45 UTC 2009


Did somebody run a full unit test across WordPress core functionality 
with PHP 5.3 ?
Today i tried a test install of PHP 5.3 and i found a lot of plugins and 
themes are failing and emitting a lot of warnings and errors now.
I could not proceed with whole WP tests yet but the most relevant 
changes are:

 * The newer internal parameter parsing API has been applied across all 
the extensions bundled with PHP 5.3.x. This parameter parsing API causes 
functions to return *NULL* when passed incompatible parameters. There 
are some exceptions to this rule, such as the get_class() 
<http://de.php.net/manual/en/function.get-class.php> function, which 
will continue to return *FALSE* on error.
 * The call_user_func() 
<http://de.php.net/manual/en/function.call-user-func.php> family of 
functions now propagate /$this/ even if the callee is a parent class.
 * The array functions natsort() 
<http://de.php.net/manual/en/function.natsort.php>, natcasesort() 
<http://de.php.net/manual/en/function.natcasesort.php>, usort() 
<http://de.php.net/manual/en/function.usort.php>, uasort() 
<http://de.php.net/manual/en/function.uasort.php>, uksort() 
<http://de.php.net/manual/en/function.uksort.php>, array_flip() 
<http://de.php.net/manual/en/function.array-flip.php>, and 
array_unique() <http://de.php.net/manual/en/function.array-unique.php> 
no longer accept objects passed as arguments. To apply these functions 
to an object, cast the object to an array first.
 * The behaviour of functions with by-reference parameters called by 
value has changed. Where previously the function would accept the 
by-value argument, a warning is now emitted and all by-ref parameters 
are set to *NULL*.
 * Assigning the return value of new 
<http://de.php.net/manual/en/language.oop5.basic.php#language.oop5.basic.new> 
by reference is now deprecated.
 * Call-time pass-by-reference is now deprecated.
 * The use of /{}/ to access string offsets is deprecated. Use /[]/ 
instead.

http://de.php.net/manual/en/migration53.deprecated.php

This may be important because some hoster/provider did start upgrading 
their server during last 2 weeks. This is current not the majority but 
in long terms there are more comming. Most of above named changes emit 
now warnings or errors, so a proper working of whole WordPress may not 
longer be given in all cases.

Can we assume, that the latest version of WordPress 2.8.2 is still PHP 
5.3 compatible at all ?
If not, should this lead to a warning publication (especially adressed 
to theme/plugin authors) ?

regards

Heiko Rabe
(www.code-styling.de)




More information about the wp-hackers mailing list