3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fh = tmpfile(); fwrite($fh, "1\r\n2\r\n3\r\n4"); fseek($fh, 0); $i = 0; while($f = fgetcsv($fh)) { $i++; echo $i; echo " - "; echo count($f); echo "\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 13
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 13
Branch analysis from position: 24
Branch analysis from position: 13
filename:       /in/21ESj
function name:  (null)
number of ops:  25
compiled vars:  !0 = $fh, !1 = $i, !2 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'tmpfile'
          1        DO_ICALL                                         $3      
          2        ASSIGN                                                   !0, $3
    3     3        INIT_FCALL                                               'fwrite'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 '1%0D%0A2%0D%0A3%0D%0A4'
          6        DO_ICALL                                                 
    4     7        INIT_FCALL                                               'fseek'
          8        SEND_VAR                                                 !0
          9        SEND_VAL                                                 0
         10        DO_ICALL                                                 
    5    11        ASSIGN                                                   !1, 0
    6    12      > JMP                                                      ->19
    7    13    >   PRE_INC                                                  !1
    8    14        ECHO                                                     !1
    9    15        ECHO                                                     '+-+'
   10    16        COUNT                                            ~9      !2
         17        ECHO                                                     ~9
   11    18        ECHO                                                     '%0A'
    6    19    >   INIT_FCALL                                               'fgetcsv'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                         $10     
         22        ASSIGN                                           ~11     !2, $10
         23      > JMPNZ                                                    ~11, ->13
   12    24    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.98 ms | 1395 KiB | 21 Q