3v4l.org

run code in 300+ PHP versions simultaneously
<?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 8.3.0 - 8.3.4
Warning: fopen(data://text/plain): Failed to open stream: rfc2397: no comma in URL in /in/JBYIC on line 3 Fatal error: Uncaught TypeError: fputcsv(): Argument #1 ($stream) must be of type resource, false given in /in/JBYIC:4 Stack trace: #0 /in/JBYIC(4): fputcsv(false, Array) #1 {main} thrown in /in/JBYIC on line 4
Process exited with code 255.
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17
Warning: fopen(data://text/plain): Failed to open stream: rfc2397: no comma in URL in /in/JBYIC on line 3 Fatal error: Uncaught TypeError: fputcsv(): Argument #1 ($stream) must be of type resource, bool given in /in/JBYIC:4 Stack trace: #0 /in/JBYIC(4): fputcsv(false, Array) #1 {main} thrown in /in/JBYIC on line 4
Process exited with code 255.
Output for 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
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, bool given in /in/JBYIC on line 4 Warning: rewind() expects parameter 1 to be resource, bool given in /in/JBYIC on line 5 Warning: stream_get_contents() expects parameter 1 to be resource, bool given in /in/JBYIC on line 6 Warning: fclose() expects parameter 1 to be resource, bool given in /in/JBYIC on line 7
Output for 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33
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 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.3.11, 4.4.0 - 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

preferences:
267.08 ms | 402 KiB | 456 Q