3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL | E_STRICT); header('Content-type: text/plain; charset=utf-8'); function a($a) { throw new Exception2('EXCEPTION MESSAGE'); } function b($b) { a($b); } try { b('THIS PARAMETER SHOULD SHOW UP'); } catch(Exception $e) { var_dump($e); } class Exception2 extends Exception { public function __construct() { $args = func_get_args(); call_user_func_array(array($this, 'parent::__construct'), $args); var_dump(debug_backtrace()); } }
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Callables of the form ["Exception2", "parent::__construct"] are deprecated in /in/QcHCP on line 26 array(3) { [0]=> array(7) { ["file"]=> string(9) "/in/QcHCP" ["line"]=> int(7) ["function"]=> string(11) "__construct" ["class"]=> string(10) "Exception2" ["object"]=> object(Exception2)#1 (7) { ["message":protected]=> string(17) "EXCEPTION MESSAGE" ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(9) "/in/QcHCP" ["line":protected]=> int(7) ["trace":"Exception":private]=> array(2) { [0]=> array(4) { ["file"]=> string(9) "/in/QcHCP" ["line"]=> int(11) ["function"]=> string(1) "a" ["args"]=> array(1) { [0]=> string(29) "THIS PARAMETER SHOULD SHOW UP" } } [1]=> array(4) { ["file"]=> string(9) "/in/QcHCP" ["line"]=> int(15) ["function"]=> string(1) "b" ["args"]=> array(1) { [0]=> string(29) "THIS PARAMETER SHOULD SHOW UP" } } } ["previous":"Exception":private]=> NULL } ["type"]=> string(2) "->" ["args"]=> array(1) { [0]=> string(17) "EXCEPTION MESSAGE" } } [1]=> array(4) { ["file"]=> string(9) "/in/QcHCP" ["line"]=> int(11) ["function"]=> string(1) "a" ["args"]=> array(1) { [0]=> string(29) "THIS PARAMETER SHOULD SHOW UP" } } [2]=> array(4) { ["file"]=> string(9) "/in/QcHCP" ["line"]=> int(15) ["function"]=> string(1) "b" ["args"]=> array(1) { [0]=> string(29) "THIS PARAMETER SHOULD SHOW UP" } } } object(Exception2)#1 (7) { ["message":protected]=> string(17) "EXCEPTION MESSAGE" ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(9) "/in/QcHCP" ["line":protected]=> int(7) ["trace":"Exception":private]=> array(2) { [0]=> array(4) { ["file"]=> string(9) "/in/QcHCP" ["line"]=> int(11) ["function"]=> string(1) "a" ["args"]=> array(1) { [0]=> string(29) "THIS PARAMETER SHOULD SHOW UP" } } [1]=> array(4) { ["file"]=> string(9) "/in/QcHCP" ["line"]=> int(15) ["function"]=> string(1) "b" ["args"]=> array(1) { [0]=> string(29) "THIS PARAMETER SHOULD SHOW UP" } } } ["previous":"Exception":private]=> NULL }

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:
36.06 ms | 409 KiB | 8 Q