3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php interface czlowiek { function a(); function b(); } class dupa extends czlowiek{ 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 5.3.0 - 5.4.27
Fatal error: Class dupa cannot extend from interface czlowiek in /in/MLEAT on line 30
Process exited with code 255.