mirror of
https://github.com/php/php-src.git
synced 2024-12-02 22:34:55 +08:00
26 lines
469 B
PHP
26 lines
469 B
PHP
--TEST--
|
|
If the LHS of ref-assign ERRORs, that takes precedence over the "only variables" notice
|
|
--FILE--
|
|
<?php
|
|
|
|
function val() {
|
|
return 42;
|
|
}
|
|
|
|
$str = "foo";
|
|
$var = 24;
|
|
var_dump($str->foo =& $var);
|
|
var_dump($str);
|
|
var_dump($str->foo =& val());
|
|
var_dump($str);
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Warning: Attempt to modify property 'foo' of non-object in %s on line %d
|
|
NULL
|
|
string(3) "foo"
|
|
|
|
Warning: Attempt to modify property 'foo' of non-object in %s on line %d
|
|
NULL
|
|
string(3) "foo"
|