Arquivos
hhvm/hphp/test/vm/closure.php.exp
T
ptarjan 4d7004e955 :Allow $this on closures
In Zend 5.3 they decided that closures should inherit the ##$this## from the containing scope. This brings us close to paraity with them. The remaining thing is to make

    function() use ($this) {}

fatal after we purge it from WWW.
2013-03-21 16:50:12 -07:00

19 linhas
512 B
Plaintext

Use: 246 2000
Args: 777 500
#0 funk() called at hphp/test/vm/closure.php:17]
#1 {closure}() called at hphp/test/vm/closure.php:27]
#2 main() called at hphp/test/vm/closure.php:33]
Use: 246 4000
Args: 888 500
#0 funk() called at hphp/test/vm/closure.php:17]
#1 {closure}() called at hphp/test/vm/closure.php:28]
#2 main() called at hphp/test/vm/closure.php:33]
object(Closure$)#1 (2) {
["use_by_val":"Closure$":private]=>
int(123)
["use_by_ref":"Closure$":private]=>
&int(4000)
}
int(123)
int(4000)