3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(class_implements(DateTime::class)); var_dump(class_implements(Generator::class)); var_dump(class_implements(stdClass::class)); var_dump(class_implements(invalidClass::class)); var_dump(class_implements(DateTime::class, false)); // different, but risky to assume via static analysis?
Output for git.master, git.master_jit, rfc.property-hooks
array(1) { ["DateTimeInterface"]=> string(17) "DateTimeInterface" } array(2) { ["Iterator"]=> string(8) "Iterator" ["Traversable"]=> string(11) "Traversable" } array(0) { } Warning: class_implements(): Class invalidClass does not exist and could not be loaded in /in/IufYX on line 6 bool(false) array(1) { ["DateTimeInterface"]=> string(17) "DateTimeInterface" }

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:
28.12 ms | 406 KiB | 5 Q