3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $nice = 1; $u = 'data://,Good Work!'; if (!isset ($u)) $nice = 0; if (ereg ('\.', $u)) $nice = 0; if (ereg ('%', $u)) $nice = 0; echo $nice; 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; echo $nice; if ($nice) { if (@file_exists ($u)) $nice = 0; } echo $nice; if ($nice) { $nice = @file_get_contents ($u); echo $nice; if ($nice === 'Good Work!') echo 'ok'; } ?>
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Call to undefined function ereg() in /in/9ll1q:5 Stack trace: #0 {main} thrown in /in/9ll1q on line 5
Process exited with code 255.
Output for 5.3.0 - 5.6.28
Deprecated: Function ereg() is deprecated in /in/9ll1q on line 5 Deprecated: Function ereg() is deprecated in /in/9ll1q on line 6 1 Deprecated: Function ereg() is deprecated in /in/9ll1q on line 8 Deprecated: Function ereg() is deprecated in /in/9ll1q on line 9 Deprecated: Function ereg() is deprecated in /in/9ll1q on line 10 Deprecated: Function ereg() is deprecated in /in/9ll1q on line 11 Deprecated: Function ereg() is deprecated in /in/9ll1q on line 12 11Good Work!ok
Output for 5.2.0 - 5.2.17
111Good Work!ok
Output for 4.3.0 - 5.1.6
111