<?php class A { public function __construct( $author, ) { if (is_int($author)) { throw new \InvalidArgumentException('oh no'); } } } try { new A(author: 100); } catch (\Exception $e) { echo $e->getMessage(); }
You have javascript disabled. You will not be able to edit any code.