php-src/Zend/tests/varSyntax/tempPropFetchByRefError.phpt
2014-05-31 20:15:55 +02:00

11 lines
233 B
PHP

--TEST--
Passing a property fetch on a temporary by reference is not allowed
--FILE--
<?php
$fn = function(&$ref) {};
$fn([0, 1]->prop);
?>
--EXPECTF--
Fatal error: Cannot use temporary expression in write context in %s on line %d