3v4l.org

run code in 300+ PHP versions simultaneously
<?php function cExceptionHandler($exception) { if ($exception instanceof c_Exception_Exit) { $msg = $exception->getMessage(); if ($msg) { echo $msg; } exit(); } elseif ($exception instanceof c_Exception_Fatal) { die($exception->getMessage()); } restore_exception_handler(); if (version_compare(PHP_VERSION, '5.3.0', '>=')) { $class = get_class($exception); throw new $class($exception->getMessage(), $exception->getCode(), $exception); } throw $exception; } set_exception_handler('cExceptionHandler'); throw new Exception('test');
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Exception: test in /in/3R4RJ:29 Stack trace: #0 {main} Next Exception: test in /in/3R4RJ:22 Stack trace: #0 [internal function]: cExceptionHandler(Object(Exception)) #1 {main} thrown in /in/3R4RJ on line 22
Process exited with code 255.

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:
41.02 ms | 401 KiB | 8 Q