Open jrfnl opened 6 years ago
Assigning the return value of new by reference is a PHP4-style practice and is not needed in PHP 5 were objects are always passed by reference.
new
DeprecatedNewReference
Detect the following code pattern(s):
$o = &new C;
And fix these to:
$o = new C;
Short description
Assigning the return value of
new
by reference is a PHP4-style practice and is not needed in PHP 5 were objects are always passed by reference.Related PHPCompatibility sniff(s):
DeprecatedNewReference
PHP manual references:
Example code:
Detect the following code pattern(s):
And fix these to: