3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [ ['foo', 'bar', 'baz="bazinga!"'], ['foo', 'bar', 'baz="bazinga!"'], ['foo', 'bar', 'baz="bazinga!"'], ['foo', 'bar', 'baz="bazinga!"'], ['foo', 'bar', 'baz="bazinga!"'], ['foo', 'bar', 'baz="bazinga!"'] ]; ob_start(); $buffer = fopen('php://output', 'w'); array_walk($a, function ($row) { fputcsv($buffer, $row); }); $csv = ob_get_clean(); echo $csv;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SluK7
function name:  (null)
number of ops:  18
compiled vars:  !0 = $a, !1 = $buffer, !2 = $csv
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   12     1        INIT_FCALL                                               'ob_start'
          2        DO_ICALL                                                 
   13     3        INIT_FCALL                                               'fopen'
          4        SEND_VAL                                                 'php%3A%2F%2Foutput'
          5        SEND_VAL                                                 'w'
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !1, $5
   14     8        INIT_FCALL                                               'array_walk'
          9        SEND_REF                                                 !0
         10        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FSluK7%3A14%240'
         11        SEND_VAL                                                 ~7
         12        DO_ICALL                                                 
   15    13        INIT_FCALL                                               'ob_get_clean'
         14        DO_ICALL                                         $9      
         15        ASSIGN                                                   !2, $9
   17    16        ECHO                                                     !2
   18    17      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FSluK7%3A14%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SluK7
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $row, !1 = $buffer
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'fputcsv'
          2        SEND_VAR                                                 !1
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
          5      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FSluK7%3A14%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.93 ms | 1395 KiB | 23 Q