3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-1); $tmp = tempnam('/tmp', 'php'); $fp = fopen($tmp, 'w+'); fwrite($fp, 'foo,bar,baz,bat'); rewind($fp); $line = fgetcsv($fp); var_dump($line); rewind($fp); $line = fgetcsv($fp, 0); var_dump($line); rewind($fp); $line = fgetcsv($fp, 10); var_dump($line);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EuZhj
function name:  (null)
number of ops:  50
compiled vars:  !0 = $tmp, !1 = $fp, !2 = $line
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 -1
          2        DO_ICALL                                                 
    3     3        INIT_FCALL                                               'tempnam'
          4        SEND_VAL                                                 '%2Ftmp'
          5        SEND_VAL                                                 'php'
          6        DO_ICALL                                         $4      
          7        ASSIGN                                                   !0, $4
    4     8        INIT_FCALL                                               'fopen'
          9        SEND_VAR                                                 !0
         10        SEND_VAL                                                 'w%2B'
         11        DO_ICALL                                         $6      
         12        ASSIGN                                                   !1, $6
    5    13        INIT_FCALL                                               'fwrite'
         14        SEND_VAR                                                 !1
         15        SEND_VAL                                                 'foo%2Cbar%2Cbaz%2Cbat'
         16        DO_ICALL                                                 
    6    17        INIT_FCALL                                               'rewind'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                                 
    8    20        INIT_FCALL                                               'fgetcsv'
         21        SEND_VAR                                                 !1
         22        DO_ICALL                                         $10     
         23        ASSIGN                                                   !2, $10
    9    24        INIT_FCALL                                               'var_dump'
         25        SEND_VAR                                                 !2
         26        DO_ICALL                                                 
   11    27        INIT_FCALL                                               'rewind'
         28        SEND_VAR                                                 !1
         29        DO_ICALL                                                 
   13    30        INIT_FCALL                                               'fgetcsv'
         31        SEND_VAR                                                 !1
         32        SEND_VAL                                                 0
         33        DO_ICALL                                         $14     
         34        ASSIGN                                                   !2, $14
   14    35        INIT_FCALL                                               'var_dump'
         36        SEND_VAR                                                 !2
         37        DO_ICALL                                                 
   16    38        INIT_FCALL                                               'rewind'
         39        SEND_VAR                                                 !1
         40        DO_ICALL                                                 
   18    41        INIT_FCALL                                               'fgetcsv'
         42        SEND_VAR                                                 !1
         43        SEND_VAL                                                 10
         44        DO_ICALL                                         $18     
         45        ASSIGN                                                   !2, $18
   19    46        INIT_FCALL                                               'var_dump'
         47        SEND_VAR                                                 !2
         48        DO_ICALL                                                 
         49      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.11 ms | 1400 KiB | 27 Q