3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Nested\Name; class Test { public static function speak(string $name) { var_dump($name); // is the same as Name::class var_dump(class_exists($name)); // to see if the class exists or not var_dump(new $name); // is the same as new Name } } class Name{} Test::speak('Nested\Name\Name');

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
156.28 ms | 1993 KiB | 12 Q