3v4l.org

run code in 300+ PHP versions simultaneously
<?php header("Content-type: multipart/x-mixed-replace;boundary=endofsection"); print "--endofsection\n"; $pmt = array("-", "\\", "|", "/" ); for( $i = 0; $i <10;$i ++ ) { sleep(1); print "Content-type: text/plain\n\n"; print "Part $i ".$pmt[$i % 4]; print "--endofsection\n"; ob_flush(); //强制将缓存区的内容输出 flush(); //强制将缓冲区的内容发送给客户端 } print "Content-type: text/plain\n\n"; print "The end\n"; print "–endofsection–\n";
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
--endofsection Content-type: text/plain Part 0 ---endofsection Notice: ob_flush(): Failed to flush buffer. No buffer to flush in /in/FZHAZ on line 11 Content-type: text/plain Part 1 \--endofsection Notice: ob_flush(): Failed to flush buffer. No buffer to flush in /in/FZHAZ on line 11
Process exited with code 137.
Output for 5.3.29, 5.4.29 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 5.6.21, 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.12 - 7.3.31, 7.4.0 - 7.4.33
--endofsection Content-type: text/plain Part 0 ---endofsection Notice: ob_flush(): failed to flush buffer. No buffer to flush in /in/FZHAZ on line 11 Content-type: text/plain Part 1 \--endofsection Notice: ob_flush(): failed to flush buffer. No buffer to flush in /in/FZHAZ on line 11
Process exited with code 137.
Output for 7.3.32 - 7.3.33
--endofsection Content-type: text/plain Part 0 ---endofsection Content-type: text/plain Part 1 \--endofsection
Process exited with code 137.
Output for 5.3.4 - 5.3.28, 5.4.0 - 5.4.28
--endofsection Content-type: text/plain Part 0 ---endofsection Notice: ob_flush(): failed to flush buffer. No buffer to flush in /in/FZHAZ on line 11
Process exited with code 137.
Output for 5.3.1 - 5.3.3
--endofsection Content-type: text/plain Part 0 ---endofsection Notice: ob_flush(): failed to flush buffer. No buffer to flush. in /in/FZHAZ on line 11
Process exited with code 137.

preferences:
181.79 ms | 401 KiB | 261 Q