3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class AA { $EE = ''; function aa() { $this->ee = '3'; } function BB() { return $this->EE; } } function CC() { return '4'; } $dd = new aa(); echo $dd->bb().cc(); var_dump( $DD );
Output for 5.4.0 - 5.4.23
Parse error: syntax error, unexpected '$EE' (T_VARIABLE), expecting function (T_FUNCTION) in /in/JMDJq on line 3
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in /in/JMDJq on line 3
Process exited with code 255.