3v4l.org

run code in 300+ PHP versions simultaneously
<?php function flatten(array $list) { $result = array(); array_walk_recursive($list, function($a) use (&$result) { $result[] = $a; }); return $result; } array_flatten([1, 2, 3, [4, 5, [6], 7], 8, 9, [10]]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sPcGD
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL_BY_NAME                                       'array_flatten'
          1        SEND_VAL_EX                                              <array>
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

Function flatten:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sPcGD
function name:  flatten
number of ops:  10
compiled vars:  !0 = $list, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        ASSIGN                                                   !1, <array>
    6     2        INIT_FCALL                                               'array_walk_recursive'
          3        SEND_REF                                                 !0
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FsPcGD%3A6%240'
          5        BIND_LEXICAL                                             ~3, !1
          6        SEND_VAL                                                 ~3
          7        DO_ICALL                                                 
    7     8      > RETURN                                                   !1
    8     9*     > RETURN                                                   null

End of function flatten

Function %00%7Bclosure%7D%2Fin%2FsPcGD%3A6%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sPcGD
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $a, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        ASSIGN_DIM                                               !1
          3        OP_DATA                                                  !0
          4      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FsPcGD%3A6%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.58 ms | 1395 KiB | 15 Q