3v4l.org

run code in 300+ PHP versions simultaneously
<?php class AException extends \Exception {} class T extends \RuntimeException{ public function __construct($message, AException $e) { parent::__construct($message, $e->getCode(), $e); } } try { throw new T("CRAP", new AException); } catch (\Exception $e) { var_dump($e); // It's not of type AException any more }

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
191.34 ms | 2239 KiB | 12 Q