3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr =[ [ "websites" => "base", "simples_skus" => "", "sku" => "8681455000016", "code" => "10001", ], [ "websites" => "base", "simples_skus" => "", "sku" => "8681455000023", "code" => "10001", ], [ "websites" => "base", "simples_skus" => "", "sku" => "8681455000214", "code" => "20003", ], [ "websites" => "base", "simples_skus" => "", "sku" => "8681455000221", "code" => "20003", ], [ "websites" => "base", "simples_skus" => "", "sku" => "8681455000245", "code" => "23443", ] ]; function merge($carry, $item){ echo $carry . "\n" . $item . "\n\n"; } $result = array_reduce(array_values($arr), "merge"); //var_dump($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DTRbp
function name:  (null)
number of ops:  10
compiled vars:  !0 = $arr, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   39     1        INIT_FCALL                                               'array_reduce'
          2        INIT_FCALL                                               'array_values'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $3      
          5        SEND_VAR                                                 $3
          6        SEND_VAL                                                 'merge'
          7        DO_ICALL                                         $4      
          8        ASSIGN                                                   !1, $4
   40     9      > RETURN                                                   1

Function merge:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DTRbp
function name:  merge
number of ops:  7
compiled vars:  !0 = $carry, !1 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   36     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   37     2        CONCAT                                           ~2      !0, '%0A'
          3        CONCAT                                           ~3      ~2, !1
          4        CONCAT                                           ~4      ~3, '%0A%0A'
          5        ECHO                                                     ~4
   38     6      > RETURN                                                   null

End of function merge

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.68 ms | 1395 KiB | 17 Q