3v4l.org

run code in 300+ PHP versions simultaneously
<?php $row_before = ['A', json_encode(['a', '\\', 'b']), 'B']; print "\nBEFORE:\n"; var_export($row_before); print "\n"; $fh = fopen($file = 'php://temp', 'rb+'); fputcsv($fh, $row_before, ',', '"', "\0"); rewind($fh); $row_after = fgetcsv($fh); print "\nAFTER:\n"; var_export($row_after); print "\n\n"; fclose($fh);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MlluN
function name:  (null)
number of ops:  41
compiled vars:  !0 = $row_before, !1 = $fh, !2 = $file, !3 = $row_after
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_ARRAY                                       ~4      'A'
          1        INIT_FCALL                                               'json_encode'
          2        SEND_VAL                                                 <array>
          3        DO_ICALL                                         $5      
          4        ADD_ARRAY_ELEMENT                                ~4      $5
          5        ADD_ARRAY_ELEMENT                                ~4      'B'
          6        ASSIGN                                                   !0, ~4
    5     7        ECHO                                                     '%0ABEFORE%3A%0A'
    6     8        INIT_FCALL                                               'var_export'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
    7    11        ECHO                                                     '%0A'
    9    12        INIT_FCALL                                               'fopen'
         13        ASSIGN                                           ~8      !2, 'php%3A%2F%2Ftemp'
         14        SEND_VAL                                                 ~8
         15        SEND_VAL                                                 'rb%2B'
         16        DO_ICALL                                         $9      
         17        ASSIGN                                                   !1, $9
   11    18        INIT_FCALL                                               'fputcsv'
         19        SEND_VAR                                                 !1
         20        SEND_VAR                                                 !0
         21        SEND_VAL                                                 '%2C'
         22        SEND_VAL                                                 '%22'
         23        SEND_VAL                                                 '%00'
         24        DO_ICALL                                                 
   13    25        INIT_FCALL                                               'rewind'
         26        SEND_VAR                                                 !1
         27        DO_ICALL                                                 
   15    28        INIT_FCALL                                               'fgetcsv'
         29        SEND_VAR                                                 !1
         30        DO_ICALL                                         $13     
         31        ASSIGN                                                   !3, $13
   17    32        ECHO                                                     '%0AAFTER%3A%0A'
   18    33        INIT_FCALL                                               'var_export'
         34        SEND_VAR                                                 !3
         35        DO_ICALL                                                 
   19    36        ECHO                                                     '%0A%0A'
   21    37        INIT_FCALL                                               'fclose'
         38        SEND_VAR                                                 !1
         39        DO_ICALL                                                 
         40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.49 ms | 960 KiB | 20 Q