PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php class A { public prop1; public function __construct() { $this->prop1 = 10; throw new \Exception('shit'); } } class B { public function h() { $a; try { $a = new A; } catch (\Exception $e) { var_export(['a' => $a, $e->getMessage()]); } } } (new B)->h();
Show:  
Copy Clear