3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function doFoo(int &$e) { try { throw new \Exception(); } catch (\Exception $e) { } } } $foo = new Foo(); $a = 1; $foo->doFoo($a); var_dump($a);
Output for 8.3.5 - 8.3.18, 8.4.9 - 8.4.18, 8.5.3
object(Exception)#2 (7) { ["message":protected]=> string(0) "" ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(9) "/in/q4dFb" ["line":protected]=> int(8) ["trace":"Exception":private]=> array(1) { [0]=> array(6) { ["file"]=> string(9) "/in/q4dFb" ["line"]=> int(18) ["function"]=> string(5) "doFoo" ["class"]=> string(3) "Foo" ["type"]=> string(2) "->" ["args"]=> array(1) { [0]=> int(1) } } } ["previous":"Exception":private]=> NULL }

preferences:
41.07 ms | 511 KiB | 4 Q