3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = str_getcsv('"blah \""', '|', '"', '\"'); $fp = fopen('php://memory', 'w'); fputcsv($fp, $data, '|', '"', '"'); fseek($fp, 0); $csv = rtrim(stream_get_contents($fp), "\r\n"); fclose($fp); fputs(STDOUT, $csv . "\n"); # "blah \""
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/l97QA
function name:  (null)
number of ops:  41
compiled vars:  !0 = $data, !1 = $fp, !2 = $csv
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'str_getcsv'
          1        SEND_VAL                                                 '%22blah+%5C%22%22'
          2        SEND_VAL                                                 '%7C'
          3        SEND_VAL                                                 '%22'
          4        SEND_VAL                                                 '%5C%22'
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !0, $3
    5     7        INIT_FCALL                                               'fopen'
          8        SEND_VAL                                                 'php%3A%2F%2Fmemory'
          9        SEND_VAL                                                 'w'
         10        DO_ICALL                                         $5      
         11        ASSIGN                                                   !1, $5
    6    12        INIT_FCALL                                               'fputcsv'
         13        SEND_VAR                                                 !1
         14        SEND_VAR                                                 !0
         15        SEND_VAL                                                 '%7C'
         16        SEND_VAL                                                 '%22'
         17        SEND_VAL                                                 '%22'
         18        DO_ICALL                                                 
    7    19        INIT_FCALL                                               'fseek'
         20        SEND_VAR                                                 !1
         21        SEND_VAL                                                 0
         22        DO_ICALL                                                 
    8    23        INIT_FCALL                                               'rtrim'
         24        INIT_FCALL                                               'stream_get_contents'
         25        SEND_VAR                                                 !1
         26        DO_ICALL                                         $9      
         27        SEND_VAR                                                 $9
         28        SEND_VAL                                                 '%0D%0A'
         29        DO_ICALL                                         $10     
         30        ASSIGN                                                   !2, $10
    9    31        INIT_FCALL                                               'fclose'
         32        SEND_VAR                                                 !1
         33        DO_ICALL                                                 
   10    34        INIT_FCALL                                               'fputs'
         35        FETCH_CONSTANT                                   ~13     'STDOUT'
         36        SEND_VAL                                                 ~13
         37        CONCAT                                           ~14     !2, '%0A'
         38        SEND_VAL                                                 ~14
         39        DO_ICALL                                                 
   12    40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.66 ms | 1388 KiB | 29 Q