3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class zyf{ public $a; public $b; function show($c) $this->a += $c; echo $this->a; } $xin = new zyf(); $xin->a=2; $xin->show(1); //输出为3 ?>
Output for 5.4.0 - 5.4.11
Parse error: syntax error, unexpected '$this' (T_VARIABLE), expecting ';' or '{' in /in/bsidd on line 7
Process exited with code 255.
Output for 5.3.0 - 5.3.21
Parse error: syntax error, unexpected T_VARIABLE, expecting ';' or '{' in /in/bsidd on line 7
Process exited with code 255.