3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); echo PHP_EOL; set_exception_handler( function () { echo 'set_exception_handler' . PHP_EOL; die(); } ); set_error_handler( function () { echo 'set_error_handler' . PHP_EOL; die(); } ); register_shutdown_function( function () { echo 'register_shutdown_function' . PHP_EOL; if (null === $error = error_get_last()) { return; } echo 'register_shutdown_function WITH exception' . PHP_EOL; throw new ErrorException('!!!'); } ); // set_exception_handler //throw new \Error('qq'); // set_exception_handler //throw new \RuntimeException('qq'); // set_error_handler //$a=b; // register_shutdown_function WITH exception ini_set('memory_limit', '1KB'); $a = []; for ($i = 1; $i <= 10000000; $i++) { $a[] = new stdClass(); }
Output for git.master, git.master_jit, rfc.property-hooks
set_error_handler register_shutdown_function

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
57.18 ms | 401 KiB | 8 Q