diff options
Diffstat (limited to 'Zend/tests/varSyntax/tempPropFetchByRefError.phpt')
-rw-r--r-- | Zend/tests/varSyntax/tempPropFetchByRefError.phpt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Zend/tests/varSyntax/tempPropFetchByRefError.phpt b/Zend/tests/varSyntax/tempPropFetchByRefError.phpt new file mode 100644 index 0000000000..f8298a936d --- /dev/null +++ b/Zend/tests/varSyntax/tempPropFetchByRefError.phpt @@ -0,0 +1,11 @@ +--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 |