<?php class X {} $s = '\x'; new $s; // a x object $x = new x(); new $x(); // another x object $s = x::class; $a = new $s; // yet another one // syntax error, unexpected token "class", // expecting variable or "$s" $a = new x::class; ?>
You have javascript disabled. You will not be able to edit any code.