3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array(array(141,151,161), 2, 3, array(101, 202, array(303,404))); function MaxArray($arr) { $max = ~PHP_INT_MAX; foreach($arr as $val) { if(is_array($val)) { $max = MaxArray($val); } if($val > $max) { $max = $val; } } return $max; } print MaxArray($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tDZcG
function name:  (null)
number of ops:  6
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   15     1        INIT_FCALL                                               'maxarray'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $2      
          4        ECHO                                                     $2
          5      > RETURN                                                   1

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

End of function maxarray

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.17 ms | 1399 KiB | 14 Q