mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
21 lines
328 B
Plaintext
21 lines
328 B
Plaintext
|
--TEST--
|
||
|
Assign result of by-value function to object property by-reference
|
||
|
--FILE--
|
||
|
<?php
|
||
|
|
||
|
function notRef() {
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
$obj = new stdClass;
|
||
|
$obj->prop =& notRef();
|
||
|
var_dump($obj);
|
||
|
|
||
|
?>
|
||
|
--EXPECTF--
|
||
|
Notice: Only variables should be assigned by reference in %s on line %d
|
||
|
object(stdClass)#1 (1) {
|
||
|
["prop"]=>
|
||
|
NULL
|
||
|
}
|