3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ParentClass{ protected function run(){} public function __call($method,$arguments) { echo "<br/>######Call ". get_called_class()."########<br>"; if(method_exists($this, $method)) { call_user_func_array(array($this,$method),$arguments); } } } class first_child extends ParentClass{ protected function run(){ echo "<br>running " . get_called_class(); $x= new second_child; $x->run(); } } class second_child extends ParentClass{ protected function run(){ echo "<br>running " . get_called_class(); } } $y= new first_child; $y->run();
Output for git.master, git.master_jit, rfc.property-hooks
<br/>######Call first_child########<br><br>running first_child<br>running second_child

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