3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Event {} $event = (new class() extends Event { public function getName() { return 'anonyme !'; } }); var_dump(get_class($event)); $event = (new class() { public function getName() { return 'anonyme !'; } }); var_dump(get_class($event));
based on Pl7pN