mirror of
https://github.com/php/php-src.git
synced 2024-12-02 22:34:55 +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
|
|
}
|