3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class parentx { //public function bagr() { } } class childx extends parentx { public function bagr() { if (!method_exists(get_parent_class($this), __FUNCTION__)) { throw new \LogicException; } // muj kód } } $x = new childx(); $x->bagr();
Output for 7.0.32 - 7.2.12
Fatal error: Uncaught LogicException in /in/b94iv:14 Stack trace: #0 /in/b94iv(21): childx->bagr() #1 {main} thrown in /in/b94iv on line 14
Process exited with code 255.
Output for 5.6.38
Fatal error: Uncaught exception 'LogicException' in /in/b94iv:14 Stack trace: #0 /in/b94iv(21): childx->bagr() #1 {main} thrown in /in/b94iv on line 14
Process exited with code 255.