3v4l.org

run code in 500+ PHP versions simultaneously
<?php $csv = <<<'CSV' 11,machin,truc,pastel,1985,5 12,toto,pouet,"Acrylique sur toile 2023 40x40",1984,12 13,bidule,bip,gouache,1992,4 CSV; $path = 'data:text/plain;base64,' . base64_encode($csv); $count = 0; if (false !== $handle = fopen($path, 'r')) { while(false !== $cols = fgetcsv($handle)) { echo "|{$cols[3]}|\n"; $count++; } } echo "\nnombre d'enregistrements: $count";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 27
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 15
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 15
Branch analysis from position: 27
Branch analysis from position: 15
Branch analysis from position: 27
filename:       /in/0TD3J
function name:  (null)
number of ops:  31
compiled vars:  !0 = $csv, !1 = $path, !2 = $count, !3 = $handle, !4 = $cols
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '11%2Cmachin%2Ctruc%2Cpastel%2C1985%2C5%0A12%2Ctoto%2Cpouet%2C%22Acrylique+sur+toile%0A2023%0A40x40%22%2C1984%2C12%0A13%2Cbidule%2Cbip%2Cgouache%2C1992%2C4'
   11     1        INIT_FCALL                                                   'base64_encode'
          2        SEND_VAR                                                     !0
          3        DO_ICALL                                             $6      
          4        CONCAT                                               ~7      'data%3Atext%2Fplain%3Bbase64%2C', $6
          5        ASSIGN                                                       !1, ~7
   13     6        ASSIGN                                                       !2, 0
   15     7        INIT_FCALL                                                   'fopen'
          8        SEND_VAR                                                     !1
          9        SEND_VAL                                                     'r'
         10        DO_ICALL                                             $10     
         11        ASSIGN                                               ~11     !3, $10
         12        TYPE_CHECK                                      1018          ~11
         13      > JMPZ                                                         ~12, ->27
   16    14    > > JMP                                                          ->21
   17    15    >   ROPE_INIT                                         3  ~15     '%7C'
         16        FETCH_DIM_R                                          ~13     !4, 3
         17        ROPE_ADD                                          1  ~15     ~15, ~13
         18        ROPE_END                                          2  ~14     ~15, '%7C%0A'
         19        ECHO                                                         ~14
   18    20        PRE_INC                                                      !2
   16    21    >   INIT_FCALL                                                   'fgetcsv'
         22        SEND_VAR                                                     !3
         23        DO_ICALL                                             $18     
         24        ASSIGN                                               ~19     !4, $18
         25        TYPE_CHECK                                      1018          ~19
         26      > JMPNZ                                                        ~20, ->15
   22    27    >   NOP                                                          
         28        FAST_CONCAT                                          ~21     '%0Anombre+d%27enregistrements%3A+', !2
         29        ECHO                                                         ~21
         30      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
127.19 ms | 482 KiB | 10 Q