3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); ini_set('display_errors',1); function callMe(){ throw new Exception('I am an exception'); return 'I RETURNED A STRING'; } try { var_dump(callMe()); } catch (\Exception $e){ var_dump($e); } // try uncatched also var_dump(callMe());
Output for git.master, git.master_jit, rfc.property-hooks
object(Exception)#1 (7) { ["message":protected]=> string(17) "I am an exception" ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(9) "/in/gPnHd" ["line":protected]=> int(6) ["trace":"Exception":private]=> array(1) { [0]=> array(4) { ["file"]=> string(9) "/in/gPnHd" ["line"]=> int(13) ["function"]=> string(6) "callMe" ["args"]=> array(0) { } } } ["previous":"Exception":private]=> NULL } Fatal error: Uncaught Exception: I am an exception in /in/gPnHd:6 Stack trace: #0 /in/gPnHd(20): callMe() #1 {main} thrown in /in/gPnHd on line 6
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:
131.15 ms | 406 KiB | 5 Q