363d1bb20f
This change is mostly for FB internal organizational reasons. Building is not effected beyond the fact that the target now lands in hphp/hhvm/hhvm rather than src/hhvm/hhvm.
35 linhas
583 B
PHP
35 linhas
583 B
PHP
<?php
|
|
|
|
function not_a_closure() {
|
|
return 1;
|
|
};
|
|
$rf = new ReflectionFunction('not_a_closure');
|
|
var_dump($rf->isClosure());
|
|
var_dump($rf->isGenerator());
|
|
|
|
|
|
function is_a_generator() {
|
|
yield 1;
|
|
yield 2;
|
|
};
|
|
$rf = new ReflectionFunction('is_a_generator');
|
|
var_dump($rf->isClosure());
|
|
var_dump($rf->isGenerator());
|
|
|
|
|
|
$cl = function() {
|
|
return 1;
|
|
};
|
|
$rf = new ReflectionFunction($cl);
|
|
var_dump($rf->isClosure());
|
|
var_dump($rf->isGenerator());
|
|
|
|
|
|
$cl = function() {
|
|
yield 1;
|
|
yield 2;
|
|
};
|
|
$rf = new ReflectionFunction($cl);
|
|
var_dump($rf->isClosure());
|
|
var_dump($rf->isGenerator());
|