3v4l.org

run code in 300+ PHP versions simultaneously
<?php $success=false; if (true) { set_error_handler(function($a, $b, $c, $d) { var_dump('error_handler', $a, $b, $c, $d); throw new ErrorException($a, $b, $c, $d); }); register_shutdown_function(function(){ if ($GLOBALS['success']){return;} var_dump('shutdown_function', error_get_last()); }); } $var = 1; try { $var->method(); // Throws an Error object in PHP 7. // $buf.='nyanpasu'; /* } catch (Error $e) { // Handle error var_dump('error', $e); */ } catch (Exception $e) { // Handle error var_dump('exception', $e); } $success=true; ?>
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to a member function method() on int in /in/BqK9U:18 Stack trace: #0 {main} thrown in /in/BqK9U on line 18 string(17) "shutdown_function" array(4) { ["type"]=> int(1) ["message"]=> string(105) "Uncaught Error: Call to a member function method() on int in /in/BqK9U:18 Stack trace: #0 {main} thrown" ["file"]=> string(9) "/in/BqK9U" ["line"]=> int(18) }
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:
55.9 ms | 402 KiB | 8 Q