Arquivos
hhvm/hphp/test/slow/volatile/1231.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

38 linhas
770 B
PHP

<?php
function autoload_first($name) {
echo __METHOD__ . "\n";
}
function autoload_second($name) {
echo __METHOD__ . "\n";
}
function __autoload($name) {
echo __METHOD__ . "\n";
}
echo "**************\n";
class_exists('A');
echo "**************\n";
spl_autoload_register('autoload_first');
spl_autoload_register('autoload_second');
class_exists('B');
echo "**************\n";
spl_autoload_unregister('autoload_first');
spl_autoload_unregister('autoload_second');
class_exists('C');
echo "**************\n";
spl_autoload_unregister('spl_autoload_call');
class_exists('D');
echo "**************\n";
// hphpc won't call the autoloader unless there exists a
// definition for the class somewhere
if (true) {
class A {
}
class B {
}
class C {
}
class D {
}
}