<?php class X{ function test(){ return new class(){ protected function __construct(){} }; } } $x = new X; var_dump($c = $x->test()); $class = get_class($c); new $class;
You have javascript disabled. You will not be able to edit any code.