Esempio n. 1
0
function run_tests()
{
    try {
        1 % 0;
    } catch (Exception $e) {
        exn($e);
    }
    try {
        1 % 0.0;
    } catch (Exception $e) {
        exn($e);
    }
    try {
        1 % noinline(0);
    } catch (Exception $e) {
        exn($e);
    }
    try {
        1 % noinline(0.0);
    } catch (Exception $e) {
        exn($e);
    }
    try {
        noinline(1) % 0;
    } catch (Exception $e) {
        exn($e);
    }
    try {
        noinline(1) % 0.0;
    } catch (Exception $e) {
        exn($e);
    }
    try {
        noinline(1) % noinline(0);
    } catch (Exception $e) {
        exn($e);
    }
    try {
        noinline(1) % noinline(0.0);
    } catch (Exception $e) {
        exn($e);
    }
}
Esempio n. 2
0
function run_tests()
{
    try {
        1 % 0;
    } catch (\__SystemLib\Throwable $e) {
        exn($e);
    }
    try {
        1 % 0.0;
    } catch (\__SystemLib\Throwable $e) {
        exn($e);
    }
    try {
        1 % noinline(0);
    } catch (\__SystemLib\Throwable $e) {
        exn($e);
    }
    try {
        1 % noinline(0.0);
    } catch (\__SystemLib\Throwable $e) {
        exn($e);
    }
    try {
        noinline(1) % 0;
    } catch (\__SystemLib\Throwable $e) {
        exn($e);
    }
    try {
        noinline(1) % 0.0;
    } catch (\__SystemLib\Throwable $e) {
        exn($e);
    }
    try {
        noinline(1) % noinline(0);
    } catch (\__SystemLib\Throwable $e) {
        exn($e);
    }
    try {
        noinline(1) % noinline(0.0);
    } catch (\__SystemLib\Throwable $e) {
        exn($e);
    }
}
Esempio n. 3
0
function run_tests()
{
    echo 3 << 64, "\n";
    echo 3 << id(64), "\n";
    echo 3 << noinline(64), "\n";
    echo id(3) << 64, "\n";
    echo id(3) << id(64), "\n";
    echo id(3) << noinline(64), "\n";
    echo noinline(3) << 64, "\n";
    echo noinline(3) << id(64), "\n";
    echo noinline(3) << noinline(64), "\n";
    echo 3 << 65, "\n";
    echo 3 << id(65), "\n";
    echo 3 << noinline(65), "\n";
    echo id(3) << 65, "\n";
    echo id(3) << id(65), "\n";
    echo id(3) << noinline(65), "\n";
    echo noinline(3) << 65, "\n";
    echo noinline(3) << id(65), "\n";
    echo noinline(3) << noinline(65), "\n";
    echo 3 >> 64, "\n";
    echo 3 >> id(64), "\n";
    echo 3 >> noinline(64), "\n";
    echo id(3) >> 64, "\n";
    echo id(3) >> id(64), "\n";
    echo id(3) >> noinline(64), "\n";
    echo noinline(3) >> 64, "\n";
    echo noinline(3) >> id(64), "\n";
    echo noinline(3) >> noinline(64), "\n";
    echo 3 >> 65, "\n";
    echo 3 >> id(65), "\n";
    echo 3 >> noinline(65), "\n";
    echo id(3) >> 65, "\n";
    echo id(3) >> id(65), "\n";
    echo id(3) >> noinline(65), "\n";
    echo noinline(3) >> 65, "\n";
    echo noinline(3) >> id(65), "\n";
    echo noinline(3) >> noinline(65), "\n";
    echo "-\n";
    echo -3 << 64, "\n";
    echo -3 << id(64), "\n";
    echo -3 << noinline(64), "\n";
    echo id(-3) << 64, "\n";
    echo id(-3) << id(64), "\n";
    echo id(-3) << noinline(64), "\n";
    echo noinline(-3) << 64, "\n";
    echo noinline(-3) << id(64), "\n";
    echo noinline(-3) << noinline(64), "\n";
    echo -3 << 65, "\n";
    echo -3 << id(65), "\n";
    echo -3 << noinline(65), "\n";
    echo id(-3) << 65, "\n";
    echo id(-3) << id(65), "\n";
    echo id(-3) << noinline(65), "\n";
    echo noinline(-3) << 65, "\n";
    echo noinline(-3) << id(65), "\n";
    echo noinline(-3) << noinline(65), "\n";
    echo -3 >> 64, "\n";
    echo -3 >> id(64), "\n";
    echo -3 >> noinline(64), "\n";
    echo id(-3) >> 64, "\n";
    echo id(-3) >> id(64), "\n";
    echo id(-3) >> noinline(64), "\n";
    echo noinline(-3) >> 64, "\n";
    echo noinline(-3) >> id(64), "\n";
    echo noinline(-3) >> noinline(64), "\n";
    echo -3 >> 65, "\n";
    echo -3 >> id(65), "\n";
    echo -3 >> noinline(65), "\n";
    echo id(-3) >> 65, "\n";
    echo id(-3) >> id(65), "\n";
    echo id(-3) >> noinline(65), "\n";
    echo noinline(-3) >> 65, "\n";
    echo noinline(-3) >> id(65), "\n";
    echo noinline(-3) >> noinline(65), "\n";
    echo "-\n";
    echo new stdclass() >> 64, "\n";
    echo new stdclass() << 64, "\n";
    echo "-\n";
    try {
        echo 3 << -1, "\n";
    } catch (\__SystemLib\Throwable $e) {
        exn($e);
    }
    try {
        echo 3 << id(-1), "\n";
    } catch (\__SystemLib\Throwable $e) {
        exn($e);
    }
    try {
        echo 3 << noinline(-1), "\n";
    } catch (\__SystemLib\Throwable $e) {
        exn($e);
    }
    try {
        echo id(3) << -1, "\n";
    } catch (\__SystemLib\Throwable $e) {
        exn($e);
    }
    try {
        echo id(3) << id(-1), "\n";
    } catch (\__SystemLib\Throwable $e) {
        exn($e);
    }
    try {
        echo id(3) << noinline(-1), "\n";
    } catch (\__SystemLib\Throwable $e) {
        exn($e);
    }
    try {
        echo noinline(3) << -1, "\n";
    } catch (\__SystemLib\Throwable $e) {
        exn($e);
    }
    try {
        echo noinline(3) << id(-1), "\n";
    } catch (\__SystemLib\Throwable $e) {
        exn($e);
    }
    try {
        echo noinline(3) << noinline(-1), "\n";
    } catch (\__SystemLib\Throwable $e) {
        exn($e);
    }
    try {
        echo 3 >> -1, "\n";
    } catch (\__SystemLib\Throwable $e) {
        exn($e);
    }
    try {
        echo 3 >> id(-1), "\n";
    } catch (\__SystemLib\Throwable $e) {
        exn($e);
    }
    try {
        echo 3 >> noinline(-1), "\n";
    } catch (\__SystemLib\Throwable $e) {
        exn($e);
    }
    try {
        echo id(3) >> -1, "\n";
    } catch (\__SystemLib\Throwable $e) {
        exn($e);
    }
    try {
        echo id(3) >> id(-1), "\n";
    } catch (\__SystemLib\Throwable $e) {
        exn($e);
    }
    try {
        echo id(3) >> noinline(-1), "\n";
    } catch (\__SystemLib\Throwable $e) {
        exn($e);
    }
    try {
        echo noinline(3) >> -1, "\n";
    } catch (\__SystemLib\Throwable $e) {
        exn($e);
    }
    try {
        echo noinline(3) >> id(-1), "\n";
    } catch (\__SystemLib\Throwable $e) {
        exn($e);
    }
    try {
        echo noinline(3) >> noinline(-1), "\n";
    } catch (\__SystemLib\Throwable $e) {
        exn($e);
    }
}
Esempio n. 4
0
function nan_tests()
{
    echo 0 / 0, "\n";
    echo 0 / id(0), "\n";
    echo 0 / noinline(0), "\n";
    echo id(0) / 0, "\n";
    echo id(0) / id(0), "\n";
    echo id(0) / noinline(0), "\n";
    echo noinline(0) / 0, "\n";
    echo noinline(0) / id(0), "\n";
    echo noinline(0) / noinline(0), "\n";
    echo 0 / 0.0, "\n";
    echo 0 / id(0.0), "\n";
    echo 0 / noinline(0.0), "\n";
    echo id(0) / 0.0, "\n";
    echo id(0) / id(0.0), "\n";
    echo id(0) / noinline(0.0), "\n";
    echo noinline(0) / 0.0, "\n";
    echo noinline(0) / id(0.0), "\n";
    echo noinline(0) / noinline(0.0), "\n";
    echo 0.0 / 0, "\n";
    echo 0.0 / id(0), "\n";
    echo 0.0 / noinline(0), "\n";
    echo id(0.0) / 0, "\n";
    echo id(0.0) / id(0), "\n";
    echo id(0.0) / noinline(0), "\n";
    echo noinline(0.0) / 0, "\n";
    echo noinline(0.0) / id(0), "\n";
    echo noinline(0.0) / noinline(0), "\n";
    echo 0.0 / 0.0, "\n";
    echo 0.0 / id(0.0), "\n";
    echo 0.0 / noinline(0.0), "\n";
    echo id(0.0) / 0.0, "\n";
    echo id(0.0) / id(0.0), "\n";
    echo id(0.0) / noinline(0.0), "\n";
    echo noinline(0.0) / 0.0, "\n";
    echo noinline(0.0) / id(0.0), "\n";
    echo noinline(0.0) / noinline(0.0), "\n";
}