3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $data = fopen('php://temp', 'r+'); fwrite($data, "test\r\ntest\r\n\r"); $stream = fopen("php://temp", 'r+'); stream_filter_append($stream, 'convert.quoted-printable-encode', STREAM_FILTER_WRITE, array('line-length' => 5, 'line-break-chars' => "\r\n")); rewind($data); stream_copy_to_stream($data, $stream);
Output for 5.1.4 - 5.6.28, 7.0.0 - 7.1.0

Process exited with code 139.
Output for hhvm-3.10.0 - 3.12.0
Warning: stream_filter_append(): unable to locate filter "convert.quoted-printable-encode" in /in/Nvnu5 on line 7
Output for 5.0.0 - 5.1.3
Warning: fopen(php://temp): failed to open stream: Success in /in/Nvnu5 on line 3 Warning: fwrite(): supplied argument is not a valid stream resource in /in/Nvnu5 on line 4 Warning: fopen(php://temp): failed to open stream: Success in /in/Nvnu5 on line 6 Warning: stream_filter_append() expects parameter 1 to be resource, boolean given in /in/Nvnu5 on line 7 Warning: rewind(): supplied argument is not a valid stream resource in /in/Nvnu5 on line 8 Warning: stream_copy_to_stream() expects parameter 1 to be resource, boolean given in /in/Nvnu5 on line 9
Output for 4.4.5 - 4.4.9
Warning: fopen(php://temp): failed to open stream: Success in /in/Nvnu5 on line 3 Warning: fwrite(): supplied argument is not a valid stream resource in /in/Nvnu5 on line 4 Warning: fopen(php://temp): failed to open stream: Success in /in/Nvnu5 on line 6 Notice: Use of undefined constant STREAM_FILTER_WRITE - assumed 'STREAM_FILTER_WRITE' in /in/Nvnu5 on line 7 Warning: stream_filter_append() expects at most 3 parameters, 4 given in /in/Nvnu5 on line 7 Warning: rewind(): supplied argument is not a valid stream resource in /in/Nvnu5 on line 8 Fatal error: Call to undefined function: stream_copy_to_stream() in /in/Nvnu5 on line 9
Process exited with code 255.
Output for 4.3.3 - 4.4.4
Warning: fopen(php://temp): failed to open stream: Success in /in/Nvnu5 on line 3 Warning: fwrite(): supplied argument is not a valid stream resource in /in/Nvnu5 on line 4 Warning: fopen(php://temp): failed to open stream: Success in /in/Nvnu5 on line 6 Notice: Use of undefined constant STREAM_FILTER_WRITE - assumed 'STREAM_FILTER_WRITE' in /in/Nvnu5 on line 7 Warning: stream_filter_append() expects at most 3 parameters, 4 given in /in/Nvnu5 on line 7 Warning: rewind(): supplied argument is not a valid stream resource in /in/Nvnu5 on line 8 Fatal error: Call to undefined function: stream_copy_to_stream() in /in/Nvnu5 on line 9
Process exited with code 255.
Output for 4.3.2
Warning: fopen(php://temp): failed to open stream: Inappropriate ioctl for device in /in/Nvnu5 on line 3 Warning: fwrite(): supplied argument is not a valid stream resource in /in/Nvnu5 on line 4 Warning: fopen(php://temp): failed to open stream: Inappropriate ioctl for device in /in/Nvnu5 on line 6 Notice: Use of undefined constant STREAM_FILTER_WRITE - assumed 'STREAM_FILTER_WRITE' in /in/Nvnu5 on line 7 Warning: stream_filter_append() expects at most 3 parameters, 4 given in /in/Nvnu5 on line 7 Warning: rewind(): supplied argument is not a valid stream resource in /in/Nvnu5 on line 8 Fatal error: Call to undefined function: stream_copy_to_stream() in /in/Nvnu5 on line 9
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Warning: fopen(php://temp) [http://www.php.net/function.fopen]: failed to create stream: Inappropriate ioctl for device in /in/Nvnu5 on line 3 Warning: fwrite(): supplied argument is not a valid stream resource in /in/Nvnu5 on line 4 Warning: fopen(php://temp) [http://www.php.net/function.fopen]: failed to create stream: Inappropriate ioctl for device in /in/Nvnu5 on line 6 Notice: Use of undefined constant STREAM_FILTER_WRITE - assumed 'STREAM_FILTER_WRITE' in /in/Nvnu5 on line 7 Warning: stream_filter_append() expects at most 3 parameters, 4 given in /in/Nvnu5 on line 7 Warning: rewind(): supplied argument is not a valid stream resource in /in/Nvnu5 on line 8 Fatal error: Call to undefined function: stream_copy_to_stream() in /in/Nvnu5 on line 9