Arquivos
hhvm/hphp/test/slow/object/664.php
T
Paul Tarjan c2ec1c97c9 sortof format slow tests
A poor man's formatter since I didn't like any of the other ones I found. The original C++ source sometimes put newlines and sometimes not.

Codemods:

    codemod '([;{}])([^\n])' '\1\n\2'
    codemod -m '\s*<\?php\s+' '<?php\n\n'
    codemod '\t' '  '

I hand-fixed all the failing tests
2013-05-30 17:32:57 -07:00

26 linhas
334 B
PHP

<?php
class A {
var $a = 1;
var $b = 2;
var $c = 3;
var $d = 4;
public function __construct() {
$this->a = 1;
$this->b = 2;
$this->c = 3;
$this->d = 4;
}
}
;
function f() {
$obj = new A();
foreach ($obj as $key => &$val) {
yield null;
$val = 5;
}
var_dump($obj);
}
foreach (f() as $_) {
}