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")) { } else if (method_exists($this, "DefaultAction")) { if ($this->DefaultAction($Action, $Data)){ } exit; } } } class TestPage extends BaseController{ private function DefaultAction(string $Action, array $Data): bool{ return false; } } $testpage = new TestPage(); $testpage->Show();
Output for 7.0.0 - 7.0.3, 7.0.20 - 7.2.0
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 20480 bytes) in /in/Ip56R 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/Ip56R on line 3
Process exited with code 255.
Output for 5.1.0 - 5.6.21
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /in/Ip56R on line 14
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_ARRAY, expecting '&' or T_VARIABLE in /in/Ip56R on line 3
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/Ip56R on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/Ip56R on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/Ip56R on line 3
Process exited with code 255.