3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php final class dupa { public $a; public static $NICE = 'STATIC_VALUE'; public function __construct($param) { $this->a = $param; echo '+_construct'.$this->a.self::$NICE; } public function __call($a, $b) { echo 'Wywolano metodÄ™ '.$a.' z parametrami:'; foreach($b as $i=>$val) { echo 'indeks: '.$i.'wartosc: '.$val; } } 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'); class blablabla extends dupa{} ?>
Output for 5.3.0 - 5.4.27
Fatal error: Class blablabla may not inherit from final class (dupa) in /in/HMlBd on line 31
Process exited with code 255.