3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C implements ArrayAccess { public offsetExists ( $offset ) { echo $offsetExists; } public offsetGet ( $offset ) { echo $offsetGet; } public offsetSet ( $offset , $value ) { echo $offsetSet; } public offsetUnset ( $offset ) { echo $offsetUnset; } } } $x = new C(); var_dump(empty($x));
Output for 5.4.0 - 5.4.20
Parse error: syntax error, unexpected 'offsetExists' (T_STRING), expecting variable (T_VARIABLE) in /in/RYUaZ on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE in /in/RYUaZ on line 4
Process exited with code 255.

preferences:
180.85 ms | 1386 KiB | 56 Q