<?php $a = new class { function hello(): string { return "hello"; } }; $class = get_class($a); $b = new $class; var_dump($b->hello());
You have javascript disabled. You will not be able to edit any code.