3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class BaseController{ public function __call(string $Action, array $Data){ if (method_exists($this, $Action . "Action")) { } elseif (method_exists($this, "DefaultAction") and $this->DefaultAction($Action, $Data)) { exit; } } } class TestPage extends BaseController{ private function DefaultAction(string $Action, array $Data){ return false; } } $testpage = new TestPage(); $testpage->Show();
based on KlFKL
Output for 7.0.20 - 7.2.0
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 20480 bytes) in /in/jcK4u on line 0
Process exited with code 255.
Output for 7.0.4 - 7.0.6
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 262144 bytes) in /in/jcK4u on line 5
Process exited with code 255.
Output for 7.0.0 - 7.0.3
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 262144 bytes) in /in/jcK4u on line 3
Process exited with code 255.
Output for 5.3.18 - 5.6.28
Catchable fatal error: Argument 1 passed to BaseController::__call() must be an instance of string, string given in /in/jcK4u on line 3
Process exited with code 255.