3v4l.org

run code in 300+ PHP versions simultaneously
<?php function MaxArray($arr) { $it = new RecursiveIteratorIterator(new RecursiveArrayIterator($arr)); $it->next(); $max = $it->current(); foreach($it as $v) if ( $v > $max ) $max = $v; return $max; } 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/RqRXA
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     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 = 14, Position 2 = 19
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 19
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 18
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 18
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/RqRXA
function name:  MaxArray
number of ops:  22
compiled vars:  !0 = $arr, !1 = $it, !2 = $max, !3 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        NEW                                              $4      'RecursiveIteratorIterator'
          2        NEW                                              $5      'RecursiveArrayIterator'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0          
          5        SEND_VAR_NO_REF_EX                                       $5
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $4
    6     8        INIT_METHOD_CALL                                         !1, 'next'
          9        DO_FCALL                                      0          
    7    10        INIT_METHOD_CALL                                         !1, 'current'
         11        DO_FCALL                                      0  $10     
         12        ASSIGN                                                   !2, $10
    8    13      > FE_RESET_R                                       $12     !1, ->19
         14    > > FE_FETCH_R                                               $12, !3, ->19
    9    15    >   IS_SMALLER                                               !2, !3
         16      > JMPZ                                                     ~13, ->18
         17    >   ASSIGN                                                   !2, !3
    8    18    > > JMP                                                      ->14
         19    >   FE_FREE                                                  $12
   10    20      > RETURN                                                   !2
   11    21*     > RETURN                                                   null

End of function maxarray

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.63 ms | 1399 KiB | 14 Q