3v4l.org

run code in 300+ PHP versions simultaneously
<?php function MaxArray($arr) { foreach($arr as $key => $val) if ( is_array($val) ) $arr[$key] = MaxArray($val); return max($arr); } echo MaxArray(array('121','414'),'12','515',array('122',array('646','4241')));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HSPPn
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'maxarray'
          1        SEND_VAL                                                 <array>
          2        SEND_VAL                                                 '12'
          3        SEND_VAL                                                 '515'
          4        SEND_VAL                                                 <array>
          5        DO_FCALL                                      0  $0      
          6        ECHO                                                     $0
          7      > RETURN                                                   1

Function maxarray:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 12
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 12
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 11
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 11
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/HSPPn
function name:  MaxArray
number of ops:  18
compiled vars:  !0 = $arr, !1 = $val, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1      > FE_RESET_R                                       $3      !0, ->12
          2    > > FE_FETCH_R                                       ~4      $3, !1, ->12
          3    >   ASSIGN                                                   !2, ~4
    6     4        TYPE_CHECK                                  128          !1
          5      > JMPZ                                                     ~6, ->11
          6    >   INIT_FCALL_BY_NAME                                       'MaxArray'
          7        SEND_VAR_EX                                              !1
          8        DO_FCALL                                      0  $8      
          9        ASSIGN_DIM                                               !0, !2
         10        OP_DATA                                                  $8
    5    11    > > JMP                                                      ->2
         12    >   FE_FREE                                                  $3
    7    13        INIT_FCALL                                               'max'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                         $9      
         16      > RETURN                                                   $9
    8    17*     > RETURN                                                   null

End of function maxarray

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
275.23 ms | 1399 KiB | 17 Q