3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MethodTest { public function nonStaticFunction() { MethodTest::runTest(); } public function __call($name, $arguments) { // Note: value of $name is case sensitive. echo "Calling object method '$name' " . implode(', ', $arguments). "\n"; } /** As of PHP 5.3.0 */ public static function __callStatic($name, $arguments) { // Note: value of $name is case sensitive. echo "Calling static method '$name' " . implode(', ', $arguments). "\n"; } } $obj = new MethodTest; $obj->runTest('in object context'); MethodTest::runTest('in static context'); $obj->nonStaticFunction('in object context');
Output for git.master, git.master_jit, rfc.property-hooks
Calling object method 'runTest' in object context Calling static method 'runTest' in static context Calling object method 'runTest'

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