3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $stream = fopen('data://text/plain', 'w+'); fputcsv($stream, array('test','csv "derp"')); rewind($stream); $csv = stream_get_contents($stream); fclose($stream); echo $csv;
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: fopen(data://text/plain): failed to open stream: rfc2397: no comma in URL in /in/JBYIC on line 3 Warning: fputcsv() expects parameter 1 to be resource, boolean given in /in/JBYIC on line 4 Warning: rewind() expects parameter 1 to be resource, boolean given in /in/JBYIC on line 5 Warning: stream_get_contents() expects parameter 1 to be resource, boolean given in /in/JBYIC on line 6 Warning: fclose() expects parameter 1 to be resource, boolean given in /in/JBYIC on line 7
Output for hhvm-3.10.0 - 3.12.0
Warning: rfc2397: missing comma in /in/JBYIC on line 3 Warning: fputcsv() expects parameter 1 to be resource, boolean given in /in/JBYIC on line 4 Warning: rewind() expects parameter 1 to be resource, boolean given in /in/JBYIC on line 5 Warning: stream_get_contents() expects parameter 1 to be resource, boolean given in /in/JBYIC on line 6 Warning: fclose() expects parameter 1 to be resource, boolean given in /in/JBYIC on line 7
Output for 5.2.0 - 5.2.17
Warning: fopen(data://text/plain): failed to open stream: rfc2397: no comma in URL in /in/JBYIC on line 3 Warning: fputcsv() expects parameter 1 to be resource, boolean given in /in/JBYIC on line 4 Warning: rewind(): supplied argument is not a valid stream resource in /in/JBYIC on line 5 Warning: stream_get_contents() expects parameter 1 to be resource, boolean given in /in/JBYIC on line 6 Warning: fclose(): supplied argument is not a valid stream resource in /in/JBYIC on line 7
Output for 5.1.0 - 5.1.6
Notice: fopen(): Unable to find the wrapper "data" - did you forget to enable it when you configured PHP? in /in/JBYIC on line 3 Warning: fopen(data://text/plain): failed to open stream: No such file or directory in /in/JBYIC on line 3 Warning: fputcsv() expects parameter 1 to be resource, boolean given in /in/JBYIC on line 4 Warning: rewind(): supplied argument is not a valid stream resource in /in/JBYIC on line 5 Warning: stream_get_contents() expects parameter 1 to be resource, boolean given in /in/JBYIC on line 6 Warning: fclose(): supplied argument is not a valid stream resource in /in/JBYIC on line 7
Output for 5.0.0 - 5.0.5
Notice: fopen(): Unable to find the wrapper "data" - did you forget to enable it when you configured PHP? in /in/JBYIC on line 3 Warning: fopen(data://text/plain): failed to open stream: No such file or directory in /in/JBYIC on line 3 Fatal error: Call to undefined function fputcsv() in /in/JBYIC on line 4
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Notice: fopen(): Unable to find the wrapper "data" - did you forget to enable it when you configured PHP? in /in/JBYIC on line 3 Warning: fopen(data://text/plain): failed to open stream: No such file or directory in /in/JBYIC on line 3 Fatal error: Call to undefined function: fputcsv() in /in/JBYIC on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Notice: fopen(): Unable to find the wrapper "data" - did you forget to enable it when you configured PHP? in /in/JBYIC on line 3 Warning: fopen(data://text/plain): failed to open stream: No such file or directory in /in/JBYIC on line 3 Fatal error: Call to undefined function: fputcsv() in /in/JBYIC on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: fopen() [http://www.php.net/function.fopen]: Unable to find the wrapper "data" - did you forget to enable it when you configured PHP? in /in/JBYIC on line 3 Warning: fopen(data://text/plain) [http://www.php.net/function.fopen]: failed to create stream: No such file or directory in /in/JBYIC on line 3 Fatal error: Call to undefined function: fputcsv() in /in/JBYIC on line 4