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) use ($buffer) { 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/aougd
function name:  (null)
number of ops:  19
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                          ~7      [0]
         11        BIND_LEXICAL                                             ~7, !1
         12        SEND_VAL                                                 ~7
         13        DO_ICALL                                                 
   15    14        INIT_FCALL                                               'ob_get_clean'
         15        DO_ICALL                                         $9      
         16        ASSIGN                                                   !2, $9
   17    17        ECHO                                                     !2
   18    18      > RETURN                                                   1


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

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.86 ms | 1463 KiB | 18 Q