blob: 561ef087d2ca3cee92e4b7d163e6512831d32f25 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
--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
}
|