--TEST-- If the LHS of ref-assign ERRORs, that takes precendence over the "only variables" notice --FILE-- 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"