3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fileHandle = fopen("php://memory", "w+"); $params = array('level' => 6, 'window' => 15, 'memory' => 9); //stream_filter_append($fileHandle, "string.rot13", STREAM_FILTER_WRITE, $params); stream_filter_append($fileHandle, 'zlib.deflate', STREAM_FILTER_WRITE, $params); $string = "Each of these code fragments is very simple, and easy to read and understand. One produces a character at a time by calling emit(); the other consumes a character at a time by calling getchar(). If only the calls to emit() and the calls to getchar() could be made to feed data to each other, it would be simple to connect the two fragments together so that the output from the decompressor went straight to the parser. In many modern operating systems, you could do this using pipes between two processes or two threads. emit() in the decompressor writes to a pipe, and getchar() in the parser reads from the other end of the same pipe. Simple and robust, but also heavyweight and not portable. Typically you don't want to have to divide your program into threads for a task this simple."; fwrite($fileHandle, $string); echo "Current position is: ".ftell($fileHandle)."\n"; rewind($fileHandle); //fseek($fileHandle, 0); //echo stream_get_contents($fileHandle); //echo "file position: ".filesize($fileHandle)."\n"; //echo "strlen = : ".strlen($string); fpassthru($fileHandle);
Output for git.master, git.master_jit, rfc.property-hooks
Current position is: 2 x��RKn�0 ���5|����*���E�B�H��}I)��"âf��~�CYAw����qK�U ܉HL��`@( ��^8s �� ^2A�΅�%T;jLs��#� (E}|�鳡؇m~�3}���:��i��J>Zo����F�.�'�f�G�� �-mW+Q�����}qQ7� �xX�Ӛi��^��mZl��#�nq@ʩ�TC��ρ��*�Ha����q�՛;�" ����Mcn�,�P*1�� M��ܠ��}��\���X�̙�"�]��cوUm�t�$e�p,�������r��/+�9Cp��H��0�Z��f���w�2��7��$<̹���.�8 �ZXq>����衶�{(��������'�=Z�`�{cL&U?w��v��Qކi#����

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
112.48 ms | 406 KiB | 5 Q