3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class dupa { public var $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') ?>
Output for 5.4.0 - 5.5.12
Parse error: syntax error, unexpected 'var' (T_VAR), expecting variable (T_VARIABLE) in /in/Q9JJH on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VAR, expecting T_VARIABLE in /in/Q9JJH on line 4
Process exited with code 255.