3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php interface czlowiek { function a(); function b(); }; class dupa implements czlowiek{ //public function a() {} //public function b(){} public $a; public static $NICE = 'STATIC_VALUE'; public function __construct($param) { $this->a = $param; echo '+_construct'.$this->a.self::$NICE; } public static function statek(){ echo "\nWywolano metode statyczna"; } public function __call($a, $b) { echo "\n".'Wywolano metodÄ™ \''.$a.'\' z parametrami:'."\n"; foreach($b as $i=>$val) { echo 'indeks: '.$i.' wartosc: '.$val."\n"; } } public function setA($a) { $this->a = $a; } }; $a = new dupa('blabla'); echo $a->a; $b = new dupa(''); echo $b->a; $b->setA('bb'); $b->setb('bb',8,true); echo dupa::$NICE; dupa::statek(); ?>
Output for 7.0.0 - 7.1.0
Fatal error: Class dupa contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (czlowiek::a, czlowiek::b) in /in/ERdoj on line 6
Process exited with code 255.
Output for hhvm-3.12.0
Fatal error: Uncaught Error: Class dupa contains abstract method (a) and must therefore be declared abstract or implement the remaining methods in /in/ERdoj:6 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.10.0
Fatal error: Class dupa contains abstract method (a) and must therefore be declared abstract or implement the remaining methods in /in/ERdoj on line 6
Process exited with code 255.
Output for 5.0.5 - 5.6.25
Fatal error: Class dupa contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (czlowiek::a, czlowiek::b) in /in/ERdoj on line 32
Process exited with code 255.
Output for 5.0.0 - 5.0.4
Fatal error: Class dupa contains 2 abstract methods and must therefore be declared abstract (czlowiek::a, czlowiek::b) in /in/ERdoj on line 32
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING in /in/ERdoj on line 2
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 in /in/ERdoj on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/ERdoj on line 2
Process exited with code 255.