3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = 'test,58597E68,abc,"58597E68",test,123,"test"'; echo 'str_getcsv():'.PHP_EOL; var_dump(str_getcsv($data)); echo PHP_EOL.'fgetcsv():'.PHP_EOL; $tmpfname = tempnam('/tmp', 'foo'); file_put_contents($tmpfname, $data); $row = 1; if (($handle = fopen($tmpfname, "r")) !== FALSE) { while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) { var_dump($data); print_r($data); } fclose($handle); } unlink($tmpfname);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 44
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 27
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 27
Branch analysis from position: 41
Branch analysis from position: 27
Branch analysis from position: 44
filename:       /in/oXkBu
function name:  (null)
number of ops:  48
compiled vars:  !0 = $data, !1 = $tmpfname, !2 = $row, !3 = $handle
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'test%2C58597E68%2Cabc%2C%2258597E68%22%2Ctest%2C123%2C%22test%22'
    5     1        ECHO                                                     'str_getcsv%28%29%3A%0A'
    6     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'str_getcsv'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $5      
          6        SEND_VAR                                                 $5
          7        DO_ICALL                                                 
    9     8        ECHO                                                     '%0Afgetcsv%28%29%3A%0A'
   10     9        INIT_FCALL                                               'tempnam'
         10        SEND_VAL                                                 '%2Ftmp'
         11        SEND_VAL                                                 'foo'
         12        DO_ICALL                                         $7      
         13        ASSIGN                                                   !1, $7
   11    14        INIT_FCALL                                               'file_put_contents'
         15        SEND_VAR                                                 !1
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                                 
   14    18        ASSIGN                                                   !2, 1
   15    19        INIT_FCALL                                               'fopen'
         20        SEND_VAR                                                 !1
         21        SEND_VAL                                                 'r'
         22        DO_ICALL                                         $11     
         23        ASSIGN                                           ~12     !3, $11
         24        TYPE_CHECK                                  1018          ~12
         25      > JMPZ                                                     ~13, ->44
   16    26    > > JMP                                                      ->33
   17    27    >   INIT_FCALL                                               'var_dump'
         28        SEND_VAR                                                 !0
         29        DO_ICALL                                                 
   18    30        INIT_FCALL                                               'print_r'
         31        SEND_VAR                                                 !0
         32        DO_ICALL                                                 
   16    33    >   INIT_FCALL                                               'fgetcsv'
         34        SEND_VAR                                                 !3
         35        SEND_VAL                                                 1000
         36        SEND_VAL                                                 '%2C'
         37        DO_ICALL                                         $16     
         38        ASSIGN                                           ~17     !0, $16
         39        TYPE_CHECK                                  1018          ~17
         40      > JMPNZ                                                    ~18, ->27
   20    41    >   INIT_FCALL                                               'fclose'
         42        SEND_VAR                                                 !3
         43        DO_ICALL                                                 
   24    44    >   INIT_FCALL                                               'unlink'
         45        SEND_VAR                                                 !1
         46        DO_ICALL                                                 
         47      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.91 ms | 945 KiB | 32 Q