3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $ye = "true"; private $nah; public function __construct() { throw new B($this); } } class B { private $that; public function __construct($that) { $this->that = $that; } } try { $a = new A(); } catch (B $b) { var_dump($b, $a); }

preferences:
44.07 ms | 402 KiB | 5 Q