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');
Output for git.master, git.master_jit, rfc.property-hooks
string(16) "Nested\Name\Name" bool(true) object(Nested\Name\Name)#1 (0) { }

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
31.26 ms | 401 KiB | 8 Q