mirror of
https://github.com/php/php-src.git
synced 2024-12-15 12:54:57 +08:00
21 lines
328 B
PHP
21 lines
328 B
PHP
--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
|
|
}
|