3v4l.org

run code in 300+ PHP versions simultaneously
<?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.

preferences:
181.51 ms | 1386 KiB | 60 Q