Arquivos
hhvm/hphp/test/quick/closure_get_declared_classes.php
T
Paul Tarjan c02df18f78 don't show Closure in get_declared_classes()
This was the fastest thing I could think of. Would string searching the name be better?

No user class can extend from Closure, so we're ok on that front.
2013-05-23 21:03:05 -07:00

12 linhas
204 B
PHP

<?php
$a = function() {};
$b = function() {};
$classes = get_declared_classes();
asort($classes);
foreach ($classes as $class) {
if (stripos($class, 'Closure') !== FALSE) {
var_dump($class);
}
}