3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string = base64_decode('R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs='); $resource = fopen('php://tmp', w); fwrite($resource, $string); fclose($resource); var_dump(mime_content_type('php://tmp'));
Output for 5.3.6 - 7.1.0
Notice: Use of undefined constant w - assumed 'w' in /in/nsNGN on line 4 Warning: fopen(): Invalid php:// URL specified in /in/nsNGN on line 4 Warning: fopen(php://tmp): failed to open stream: operation failed in /in/nsNGN on line 4 Warning: fwrite() expects parameter 1 to be resource, boolean given in /in/nsNGN on line 5 Warning: fclose() expects parameter 1 to be resource, boolean given in /in/nsNGN on line 6 Warning: mime_content_type(): Invalid php:// URL specified in /in/nsNGN on line 8 Warning: mime_content_type(php://tmp): failed to open stream: operation failed in /in/nsNGN on line 8 bool(false)
Output for 5.3.0 - 5.3.5
Notice: Use of undefined constant w - assumed 'w' in /in/nsNGN on line 4 Warning: fopen(): Invalid php:// URL specified in /in/nsNGN on line 4 Warning: fopen(php://tmp): failed to open stream: operation failed in /in/nsNGN on line 4 Warning: fwrite() expects parameter 1 to be resource, boolean given in /in/nsNGN on line 5 Warning: fclose() expects parameter 1 to be resource, boolean given in /in/nsNGN on line 6 Warning: mime_content_type(): File or path not found 'php://tmp' in /in/nsNGN on line 8 bool(false)
Output for 5.2.7 - 5.2.17
Notice: Use of undefined constant w - assumed 'w' in /in/nsNGN on line 4 Warning: fopen(): Invalid php:// URL specified in /in/nsNGN on line 4 Warning: fopen(php://tmp): failed to open stream: operation failed in /in/nsNGN on line 4 Warning: fwrite(): supplied argument is not a valid stream resource in /in/nsNGN on line 5 Warning: fclose(): supplied argument is not a valid stream resource in /in/nsNGN on line 6 Fatal error: Call to undefined function mime_content_type() in /in/nsNGN on line 8
Process exited with code 255.
Output for 5.2.1 - 5.2.6
Notice: Use of undefined constant w - assumed 'w' in /in/nsNGN on line 4 Warning: fopen(): Invalid php:// URL specified in /in/nsNGN on line 4 Warning: fopen(php://tmp): failed to open stream: Inappropriate ioctl for device in /in/nsNGN on line 4 Warning: fwrite(): supplied argument is not a valid stream resource in /in/nsNGN on line 5 Warning: fclose(): supplied argument is not a valid stream resource in /in/nsNGN on line 6 Fatal error: Call to undefined function mime_content_type() in /in/nsNGN on line 8
Process exited with code 255.
Output for 5.0.0 - 5.2.0
Notice: Use of undefined constant w - assumed 'w' in /in/nsNGN on line 4 Warning: fopen(php://tmp): failed to open stream: Inappropriate ioctl for device in /in/nsNGN on line 4 Warning: fwrite(): supplied argument is not a valid stream resource in /in/nsNGN on line 5 Warning: fclose(): supplied argument is not a valid stream resource in /in/nsNGN on line 6 Fatal error: Call to undefined function mime_content_type() in /in/nsNGN on line 8
Process exited with code 255.
Output for 4.4.9
Notice: Use of undefined constant w - assumed 'w' in /in/nsNGN on line 4 Warning: fopen(php://tmp): failed to open stream: Cannot allocate memory in /in/nsNGN on line 4 Warning: fwrite(): supplied argument is not a valid stream resource in /in/nsNGN on line 5 Warning: fclose(): supplied argument is not a valid stream resource in /in/nsNGN on line 6 Fatal error: Call to undefined function: mime_content_type() in /in/nsNGN on line 8
Process exited with code 255.
Output for 4.4.5 - 4.4.8
Notice: Use of undefined constant w - assumed 'w' in /in/nsNGN on line 4 Warning: fopen(php://tmp): failed to open stream: Success in /in/nsNGN on line 4 Warning: fwrite(): supplied argument is not a valid stream resource in /in/nsNGN on line 5 Warning: fclose(): supplied argument is not a valid stream resource in /in/nsNGN on line 6 Fatal error: Call to undefined function: mime_content_type() in /in/nsNGN on line 8
Process exited with code 255.
Output for 4.3.3 - 4.4.4
Notice: Use of undefined constant w - assumed 'w' in /in/nsNGN on line 4 Warning: fopen(php://tmp): failed to open stream: Success in /in/nsNGN on line 4 Warning: fwrite(): supplied argument is not a valid stream resource in /in/nsNGN on line 5 Warning: fclose(): supplied argument is not a valid stream resource in /in/nsNGN on line 6 Fatal error: Call to undefined function: mime_content_type() in /in/nsNGN on line 8
Process exited with code 255.
Output for 4.3.2
Notice: Use of undefined constant w - assumed 'w' in /in/nsNGN on line 4 Warning: fopen(php://tmp): failed to open stream: Inappropriate ioctl for device in /in/nsNGN on line 4 Warning: fwrite(): supplied argument is not a valid stream resource in /in/nsNGN on line 5 Warning: fclose(): supplied argument is not a valid stream resource in /in/nsNGN on line 6 Fatal error: Call to undefined function: mime_content_type() in /in/nsNGN on line 8
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Use of undefined constant w - assumed 'w' in /in/nsNGN on line 4 Warning: fopen(php://tmp) [http://www.php.net/function.fopen]: failed to create stream: Inappropriate ioctl for device in /in/nsNGN on line 4 Warning: fwrite(): supplied argument is not a valid stream resource in /in/nsNGN on line 5 Warning: fclose(): supplied argument is not a valid stream resource in /in/nsNGN on line 6 Fatal error: Call to undefined function: mime_content_type() in /in/nsNGN on line 8