migrate icon indicating copy to clipboard operation
migrate copied to clipboard

Assigning the return value of new by reference is deprecated

Open boedah opened this issue 14 years ago • 0 comments

Hi Stanislav,

currently in the process of migrating some sites to PHP5.3 and found your check script very valuable.

I added a check for those PHP4-style "referenced object creation", which now emit a deprecation warning. This also seems to happen at compile time, which is not mentioned in the docs.

So a

error_reporting(0);
die;
$f =& new Foo;

also triggers the deprecation error if it is not excluded in php.ini.

Best regards, Peter

boedah avatar Nov 09 '11 12:11 boedah