3v4l.org

run code in 300+ PHP versions simultaneously
<?php $all = array(array("class"=>array(array("peter","15","male"),array("mary","24","female"),array("jason","22","male")))); function merge($prev,$now){ return array_merge($prev,$now['class']); } $cc = array_reduce($all,"merge",array()); print_r($cc);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7SjNl
function name:  (null)
number of ops:  11
compiled vars:  !0 = $all, !1 = $cc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    6     1        INIT_FCALL                                               'array_reduce'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 'merge'
          4        SEND_VAL                                                 <array>
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !1, $3
    7     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Function merge:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7SjNl
function name:  merge
number of ops:  9
compiled vars:  !0 = $prev, !1 = $now
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        INIT_FCALL                                               'array_merge'
          3        SEND_VAR                                                 !0
          4        FETCH_DIM_R                                      ~2      !1, 'class'
          5        SEND_VAL                                                 ~2
          6        DO_ICALL                                         $3      
          7      > RETURN                                                   $3
    5     8*     > RETURN                                                   null

End of function merge

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.71 ms | 1386 KiB | 19 Q