3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $color = 'blue'; if ( isset( $_GET['COLOR'] ) ) $color = $_GET['COLOR']; require( $color . '.php' ); ?> <form> <select name="COLOR"> <option value="red">red</option> <option value="blue">blue</option> </select> <input type="submit"> </form>
Output for 5.1.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: require(blue.php): failed to open stream: No such file or directory in /in/UcOIO on line 5 Fatal error: require(): Failed opening required 'blue.php' (include_path='.:') in /in/UcOIO on line 5
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
Fatal error: File not found: blue.php in /in/UcOIO on line 5
Process exited with code 255.
Output for 4.3.2 - 5.0.5
Warning: main(blue.php): failed to open stream: No such file or directory in /in/UcOIO on line 5 Fatal error: main(): Failed opening required 'blue.php' (include_path='.:') in /in/UcOIO on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Warning: main(blue.php) [http://www.php.net/function.main]: failed to create stream: No such file or directory in /in/UcOIO on line 5 Fatal error: main() [http://www.php.net/function.main]: Failed opening required 'blue.php' (include_path='.:') in /in/UcOIO on line 5