3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = fopen('php://temp', 'r+'); $b = fopen('php://temp', 'r+'); fwrite($a, 'aaa'); fwrite($b, 'bbb'); rewind($a); rewind($b); echo fread($a, 6); echo '-'; echo fread($b, 6);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YklhS
function name:  (null)
number of ops:  36
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'fopen'
          1        SEND_VAL                                                 'php%3A%2F%2Ftemp'
          2        SEND_VAL                                                 'r%2B'
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !0, $2
    4     5        INIT_FCALL                                               'fopen'
          6        SEND_VAL                                                 'php%3A%2F%2Ftemp'
          7        SEND_VAL                                                 'r%2B'
          8        DO_ICALL                                         $4      
          9        ASSIGN                                                   !1, $4
    5    10        INIT_FCALL                                               'fwrite'
         11        SEND_VAR                                                 !0
         12        SEND_VAL                                                 'aaa'
         13        DO_ICALL                                                 
    6    14        INIT_FCALL                                               'fwrite'
         15        SEND_VAR                                                 !1
         16        SEND_VAL                                                 'bbb'
         17        DO_ICALL                                                 
    7    18        INIT_FCALL                                               'rewind'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                                 
    8    21        INIT_FCALL                                               'rewind'
         22        SEND_VAR                                                 !1
         23        DO_ICALL                                                 
    9    24        INIT_FCALL                                               'fread'
         25        SEND_VAR                                                 !0
         26        SEND_VAL                                                 6
         27        DO_ICALL                                         $10     
         28        ECHO                                                     $10
   10    29        ECHO                                                     '-'
   11    30        INIT_FCALL                                               'fread'
         31        SEND_VAR                                                 !1
         32        SEND_VAL                                                 6
         33        DO_ICALL                                         $11     
         34        ECHO                                                     $11
         35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.77 ms | 1388 KiB | 21 Q