3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php # Save the audio to a URL-accessible directory for playback. parse_str($_SERVER['QUERY_STRING'], $params); $str = 'randomtype'; $file_name = md5($str); $name = isset($params['fileName']) ? $params['fileName'] : $file_name + 'randomtype.mp3'; $content = file_get_contents('php://input'); $fh = fopen($name, 'w') or die("can't open file"); fwrite($fh, $content); fclose($fh); ?>
Output for 7.1.0
Notice: Undefined index: QUERY_STRING in /in/qGBRj on line 3 Notice: A non well formed numeric value encountered in /in/qGBRj on line 6 Warning: A non-numeric value encountered in /in/qGBRj on line 6 Warning: fopen(60): failed to open stream: Permission denied in /in/qGBRj on line 8 can't open file
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.0.14
Notice: Undefined index: QUERY_STRING in /in/qGBRj on line 3 Warning: fopen(60): failed to open stream: Permission denied in /in/qGBRj on line 8 can't open file
Output for hhvm-3.12.0
Notice: Undefined index: QUERY_STRING in /in/qGBRj on line -1 Warning: Permission denied in /in/qGBRj on line -1 can't open file
Output for hhvm-3.10.0
Notice: Undefined index: QUERY_STRING in /in/qGBRj on line 3 Warning: Permission denied in /in/qGBRj on line 8 can't open file
Output for 4.3.2 - 5.2.17
Notice: Undefined index: QUERY_STRING in /in/qGBRj on line 3 Warning: fopen(60): failed to open stream: Permission denied in /in/qGBRj on line 8 can't open file
Output for 4.3.1
Notice: Undefined index: QUERY_STRING in /in/qGBRj on line 3 Warning: fopen(60) [http://www.php.net/function.fopen]: failed to create stream: Permission denied in /in/qGBRj on line 8 can't open file
Output for 4.3.0
Notice: Undefined index: QUERY_STRING in /in/qGBRj on line 3 Warning: fopen(60) [http://www.php.net/function.fopen]: failed to create stream: Read-only file system in /in/qGBRj on line 8 can't open file