Arquivos
hhvm/hphp/test/slow/ext_misc/ext_misc.php
T
Jordan DeLong 877603b393 Convert most of TestExtMisc to php; delete rest
Removed all the tests that tested functions that just throw
NotImplemented, or actually did sleeps (without any testing that the
sleep actually did anything).  Otherwise about the same, but I had to
add some assumptions in unpack because you can't do sizeof() from php.
2013-06-18 16:23:23 -07:00

28 linhas
726 B
PHP

<?php
function VS($x, $y) {
var_dump($x === $y);
if ($x !== $y) { echo "Failed: $y\n"; echo "Got: $x\n";
var_dump(debug_backtrace()); }
}
function VERIFY($x) { VS($x, true); }
//////////////////////////////////////////////////////////////////////
VERIFY(connection_aborted() != true);
VERIFY(connection_status() == CONNECTION_NORMAL);
VERIFY(connection_timeout() != true);
constant("a");
VERIFY(defined("a") != true);
__halt_compiler();
ignore_user_abort("a");
VERIFY(empty(uniqid()) != true);
VS(token_name(258), "T_REQUIRE_ONCE");
VS(count(sys_getloadavg()), 3);
$src = "blarb <?php 1";
VS(token_get_all(src),
array(array(T_INLINE_HTML, "blarb ", 1),
array(T_OPEN_TAG, "<?php", 1)));