3v4l.org

run code in 300+ PHP versions simultaneously
<?php final class mGenerator implements Iterator { void rewind(); bool valid(); mixed current(); mixed key(); void next(); mixed send(mixed $value); mixed throw(Exception $exception); } $mg = new mGenerator(); var_dump($mg);
Output for 5.4.0 - 5.4.22, 5.5.0 - 5.5.6
Parse error: syntax error, unexpected 'void' (T_STRING), expecting function (T_FUNCTION) in /in/6r96d 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_FUNCTION in /in/6r96d on line 4
Process exited with code 255.

preferences:
186.35 ms | 1395 KiB | 65 Q