summaryrefslogtreecommitdiff
path: root/Zend/tests/closure_022.phpt
blob: 55f1ff5a8d3ff511fcbb73461276c7f127ae1c56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--TEST--
Closure 022: Closure properties
--FILE--
<?php
$a = 0;
$foo = function() use ($a) {
};
$foo->a = 1;
?>
--EXPECTF--
Fatal error: Uncaught exception 'EngineException' with message 'Closure object cannot have properties' in %sclosure_022.php:5
Stack trace:
#0 {main}
  thrown in %sclosure_022.php on line 5