[TYPO3-core] #53682, PHP 5.5.6, call-time pass-by-reference, PHP 5.6

Philipp Gampe philipp.gampe at typo3.org
Thu Dec 12 23:18:20 CET 2013

Hi all,

Some distributions (like Fedora) already ship PHP 5.5.6. The version 
includes a performance improvement for func_get_args() that breaks the TYPO3 
backend (all versions).

> Improved performance of array_merge() and func_get_args() by eliminating
>     useless copying. (Dmitry)

> Exception '$toolbarItem "shortcuts" must implement interface ... 

The problem here is that the deprecated usage of the reference operator is 
used in the interface of ToolBarItemHook (top bar items).
Removing the reference operator changes the method signature and PHP throws 
a fatal error for each implementing class.
This will break any backend where extensions with custom toolbar items (e.g. 
extdevel) are used - even if we fix all usages in the core itself.

The change in PHP 5.5.6 has been reverted for PHP 5.5.7:
However PHP 5.6 (expected in June) will ship the change. Therefore we need 
to react.

There is a change suggested to change makeInstance() to check for such a 
reference operator (via reflection) and pass the parameter by reference.
Although the change did not have a big impact for me, it still create yet 
another performance drawback.

I suggest to change the the problematic lines in the core for 6.2 as we will 
get a breaking backend without it and extensions are expected to likely 

Will still need to find a solution for <=6.1. Either by introducing an upper 
the PHP version limit for the older branches as PHP 5.5.x excluding 5.5.6; 
or by changing the code (likely breaks many backends) or by introducing the 
workaround from above.

I would like to hear your options regarding this topic.

Best regards
Philipp Gampe – PGP-Key 0AD96065 – TYPO3 UG Bonn/Köln
Documentation – Active contributor TYPO3 CMS
TYPO3 .... inspiring people to share!

More information about the TYPO3-team-core mailing list