3v4l.org

run code in 500+ PHP versions simultaneously
<?php $arr = [[["AAA", "BBB"]], [["CCC"]]]; function flatten($arr) { return array_merge(...$arr); } $arr = flatten(flatten($arr)); print_r($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8hHWf
function name:  (null)
number of ops:  12
compiled vars:  !0 = $arr
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    7     1        INIT_FCALL                                                   'flatten'
          2        INIT_FCALL                                                   'flatten'
          3        SEND_VAR                                                     !0
          4        DO_FCALL                                          0  $2      
          5        SEND_VAR                                                     $2
          6        DO_FCALL                                          0  $3      
          7        ASSIGN                                                       !0, $3
    8     8        INIT_FCALL                                                   'print_r'
          9        SEND_VAR                                                     !0
         10        DO_ICALL                                                     
         11      > RETURN                                                       1

Function flatten:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8hHWf
function name:  flatten
number of ops:  7
compiled vars:  !0 = $arr
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   RECV                                                 !0      
    5     1        INIT_FCALL                                                   'array_merge'
          2        SEND_UNPACK                                                  !0
          3        CHECK_UNDEF_ARGS                                             
          4        DO_ICALL                                             $1      
          5      > RETURN                                                       $1
    6     6*     > RETURN                                                       null

End of function flatten

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
156.99 ms | 2236 KiB | 17 Q