3v4l.org

run code in 300+ PHP versions simultaneously
<?php $nice = 1; $u = 'data://,Good Work!'; if (!isset ($u)) $nice = 0; if (ereg ('\.', $u)) $nice = 0; if (ereg ('%', $u)) $nice = 0; if (ereg ('[0-9]', $u)) $nice = 0; if (ereg ('http', $u) ) $nice = 0; if (ereg ('https', $u) ) $nice = 0; if (ereg ('ftp', $u)) $nice = 0; if (ereg ('telnet', $u)) $nice = 0; if ($nice) { if (@file_exists ($u)) $nice = 0; } if ($nice) { $nice = @file_get_contents ($u); if ($nice === 'Good Work!') echo 'ok' } ?>
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.27
Parse error: syntax error, unexpected '}', expecting ',' or ';' in /in/1sBCv on line 18
Process exited with code 255.

preferences:
170.78 ms | 1399 KiB | 64 Q