3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = [ ['p_description' => 'Eggs', 'p_category' => 'Food', 'p_cost' => 20, 'p_stock' => 20], ['p_description' => 'Coca Cola', 'p_category' => 'Drinks', 'p_cost' => 5, 'p_stock' => 30], ]; echo implode(', ', array_map(function($row) { return '[' . implode(', ', $row) . ']'; }, $result));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AYaDn
function name:  (null)
number of ops:  12
compiled vars:  !0 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    8     1        INIT_FCALL                                               'implode'
          2        SEND_VAL                                                 '%2C+'
          3        INIT_FCALL                                               'array_map'
          4        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
   10     5        SEND_VAL                                                 ~2
          6        SEND_VAR                                                 !0
    8     7        DO_ICALL                                         $3      
   10     8        SEND_VAR                                                 $3
    8     9        DO_ICALL                                         $4      
   10    10        ECHO                                                     $4
         11      > 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/AYaDn
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $row
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        INIT_FCALL                                               'implode'
          2        SEND_VAL                                                 '%2C+'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $1      
          5        CONCAT                                           ~2      '%5B', $1
          6        CONCAT                                           ~3      ~2, '%5D'
          7      > RETURN                                                   ~3
   10     8*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.07 ms | 1433 KiB | 15 Q