3v4l.org

run code in 300+ PHP versions simultaneously
<?php class x {} $z='x'; var_dump(new $z); var_dump(new$z);
Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.23, 7.4.0 - 7.4.11, 8.0.0alpha1 - rc2
object(x)#1 (0) { } object(x)#1 (0) { }