Arquivos
hhvm/hphp/test/slow/object_invoke_method/766.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

16 linhas
293 B
PHP

<?php
// taking default args
class C3 {
public function __invoke($a0, $a1 = array(), $a2 = false) {
var_dump($a0, $a1, $a2);
}
}
$c = new C3;
$c(0);
$c(0, array(1));
$c(0, array(1), true);
call_user_func($c, 0);
call_user_func($c, 0, array(1));
call_user_func($c, 0, array(1), true);