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

Xavier Perseguers xavier at typo3.org
Fri Dec 13 09:38:26 CET 2013


Hi,

> It is WRONG that passing variables by reference is deprecated. It is of course not!!!
> http://php.net/manual/en/language.references.pass.php
> 
> What has been deprecated long ago is the & operator used on variables in a function call. So called "call-time pass-by-reference". (function foo($x) {}    $a = ''; foo(&$a);)

Yes, true.

> It is indeed a breaking change in PHP 5.6+ that the support of passing variables by reference to a constructor is not possible anymore.

I checked Philipp's patch and as we are expecting an object to be
passed, there's no point into using the & operator as an object is
already passed by reference. So it's a breaking change yes and no since
using the & operator is deprecated since long (perhaps not stated like
that but since it does not bring anything into using it, at least it's
somehow deprecated for long).

-- 
Xavier Perseguers
Release Manager TYPO3 4.6

TYPO3 .... inspiring people to share!
Get involved: http://typo3.org



More information about the TYPO3-team-core mailing list