Arquivos
hhvm/hphp/test/vm/closure_clone.php
T
ptarjan 23b681e872 allow closures to be cloned
In HPHPc it didn't allow closures to be cloned but in HHVM it did. When I migrated to a C++ closure then i left the HPHPc code. Zend 5.4 allows them to be cloned so lets go with this.
2013-03-09 14:04:11 -08:00

7 linhas
85 B
PHP

<?php
$a = function() { return 1; };
$b = clone $a;
var_dump($a());
var_dump($b());