3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface A extends Traversable { } class B extends A implements IteratorAggregate { return ArrayIterator(array()); }
Output for 5.4.18
Parse error: syntax error, unexpected 'return' (T_RETURN), expecting function (T_FUNCTION) in /in/AerZj on line 9
Process exited with code 255.
Output for 5.4.0 - 5.4.17
Parse error: syntax error, unexpected 'return' (T_RETURN), expecting function (T_FUNCTION) in /in/MmncI on line 9
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_RETURN, expecting T_FUNCTION in /in/MmncI on line 9
Process exited with code 255.

preferences:
170.86 ms | 1395 KiB | 54 Q