3v4l.org

run code in 300+ PHP versions simultaneously
<?php function x($id) { var_dump(join(', ', array_flatten(func_get_args()))); } function array_flatten($ary) { // http://stackoverflow.com/a/1320259 if (!$ary) return $ary; $_ary = array(); $it = new RecursiveIteratorIterator(new RecursiveArrayIterator($ary)); foreach ($it as $val) $_ary[] = $val; return $_ary; } x(123,123,324,6345);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iSGHn
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                               'x'
          1        SEND_VAL                                                 123
          2        SEND_VAL                                                 123
          3        SEND_VAL                                                 324
          4        SEND_VAL                                                 6345
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Function x:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iSGHn
function name:  x
number of ops:  13
compiled vars:  !0 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'join'
          3        SEND_VAL                                                 '%2C+'
          4        INIT_FCALL_BY_NAME                                       'array_flatten'
          5        FUNC_GET_ARGS                                    ~1      
          6        SEND_VAL_EX                                              ~1
          7        DO_FCALL                                      0  $2      
          8        SEND_VAR                                                 $2
          9        DO_ICALL                                         $3      
         10        SEND_VAR                                                 $3
         11        DO_ICALL                                                 
    4    12      > RETURN                                                   null

End of function x

Function array_flatten:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 17
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 17
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/iSGHn
function name:  array_flatten
number of ops:  20
compiled vars:  !0 = $ary, !1 = $_ary, !2 = $it, !3 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        BOOL_NOT                                         ~4      !0
          2      > JMPZ                                                     ~4, ->4
    7     3    > > RETURN                                                   !0
    8     4    >   ASSIGN                                                   !1, <array>
    9     5        NEW                                              $6      'RecursiveIteratorIterator'
          6        NEW                                              $7      'RecursiveArrayIterator'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
          9        SEND_VAR_NO_REF_EX                                       $7
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !2, $6
   10    12      > FE_RESET_R                                       $11     !2, ->17
         13    > > FE_FETCH_R                                               $11, !3, ->17
   11    14    >   ASSIGN_DIM                                               !1
         15        OP_DATA                                                  !3
   10    16      > JMP                                                      ->13
         17    >   FE_FREE                                                  $11
   12    18      > RETURN                                                   !1
   13    19*     > RETURN                                                   null

End of function array_flatten

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.13 ms | 1407 KiB | 18 Q