3v4l.org

run code in 300+ PHP versions simultaneously
<?php class myClass { public function toCall() { echo 'called'; } public function fromCall(callable $call) { echo 'from'; } public function __construct() { $this->fromCall($this, 'toCall'); } } $myClass = new myClass();
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: myClass::fromCall(): Argument #1 ($call) must be of type callable, myClass given, called in /in/XD04K on line 14 and defined in /in/XD04K:8 Stack trace: #0 /in/XD04K(14): myClass->fromCall(Object(myClass), 'toCall') #1 /in/XD04K(19): myClass->__construct() #2 {main} thrown in /in/XD04K on line 8
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:
33.13 ms | 401 KiB | 8 Q