3v4l.org

run code in 300+ PHP versions simultaneously
<?php class FunkyException extends Exception { protected $errors = []; public function __constructor ($message, $errors) { $this->message = $message; $this->errors = $errors; } public function getErrors() { return $this->errors; } } try { throw new Exception ('test', ['this','that']); } catch (FunkyException $e) { print_r ($e->getErrors()); }

preferences:
53.52 ms | 402 KiB | 5 Q