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); } }
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); } }
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); } }
public function __toString() { return 'D to string'; } } function exn($e) { printf("%s: %s\n", get_class($e), $e->getMessage()); } assert_options(ASSERT_ACTIVE, 1); assert_options(ASSERT_EXCEPTION, 1); try { assert(false); } catch (Exception $e) { exn($e); } try { assert(false, 'hi'); } catch (Exception $e) { exn($e); } try { assert(false, new C()); } catch (Exception $e) { exn($e); } try { assert(false, new D()); } catch (Exception $e) { exn($e); }