3v4l.org

run code in 300+ PHP versions simultaneously
<?php $nums = array(7, 13, 2, 8, 54, 1); print "<p>" . find($nums) . "</p>"; function find($array) { if(!is_array($array)) return FALSE; $val = $array[0]; foreach($array as $nums) { if($nums > $val) { $val = $num; } } return $val; } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sg3Wq
function name:  (null)
number of ops:  8
compiled vars:  !0 = $nums
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL_BY_NAME                                       'find'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $2      
          4        CONCAT                                           ~3      '%3Cp%3E', $2
          5        CONCAT                                           ~4      ~3, '%3C%2Fp%3E'
          6        ECHO                                                     ~4
   25     7      > RETURN                                                   1

Function find:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 13
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 12
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/sg3Wq
function name:  find
number of ops:  16
compiled vars:  !0 = $array, !1 = $val, !2 = $nums, !3 = $num
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    9     1        TYPE_CHECK                                  128  ~4      !0
          2        BOOL_NOT                                         ~5      ~4
          3      > JMPZ                                                     ~5, ->5
   10     4    > > RETURN                                                   <false>
   12     5    >   FETCH_DIM_R                                      ~6      !0, 0
          6        ASSIGN                                                   !1, ~6
   14     7      > FE_RESET_R                                       $8      !0, ->13
          8    > > FE_FETCH_R                                               $8, !2, ->13
   16     9    >   IS_SMALLER                                               !1, !2
         10      > JMPZ                                                     ~9, ->12
   18    11    >   ASSIGN                                                   !1, !3
   14    12    > > JMP                                                      ->8
         13    >   FE_FREE                                                  $8
   22    14      > RETURN                                                   !1
   24    15*     > RETURN                                                   null

End of function find

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.2 ms | 1395 KiB | 13 Q