Arquivos
hhvm/hphp/test/quick/closure_in_generator.php
T
ptarjan 503f75d08b Rename test directories
These names don't make sense now that we run both suites the same
way.
2013-04-17 09:06:51 -07:00

19 linhas
221 B
PHP

<?php
class A {
public function b() {
$cl = function() {
return $this->c();
};
yield $cl();
}
private function c() {
return 'A';
}
}
$a = new A;
foreach ($a->b() as $c) {
print "$c\n";
}