3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static function staticmethod() { echo __METHOD__.PHP_EOL; return static::nonstaticmethod(); } public function nonstaticmethod() { echo __METHOD__.PHP_EOL; } } Foo::staticmethod();
Output for git.master, git.master_jit, rfc.property-hooks
Foo::staticmethod Fatal error: Uncaught Error: Non-static method Foo::nonstaticmethod() cannot be called statically in /in/uV0kX:4 Stack trace: #0 /in/uV0kX(10): Foo::staticmethod() #1 {main} thrown in /in/uV0kX on line 4
Process exited with code 255.

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:
39.95 ms | 401 KiB | 8 Q