3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = Array ( "0" => 12 , "1" => 17 , "2" => 5, "3" => 27, "4" => 5 ); $arrays = $array; //print_r($array); $i=1; foreach($arrays as $key=>$values) { echo max($array)." rank is ". $i."\n"; unset($array[$key]); if(!in_array($values,$array)) $i++; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 22
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 22
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 21
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 21
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/MEXNv
function name:  (null)
number of ops:  24
compiled vars:  !0 = $array, !1 = $arrays, !2 = $i, !3 = $values, !4 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, !0
    7     2        ASSIGN                                                   !2, 1
    8     3      > FE_RESET_R                                       $8      !1, ->22
          4    > > FE_FETCH_R                                       ~9      $8, !3, ->22
          5    >   ASSIGN                                                   !4, ~9
   10     6        INIT_FCALL                                               'max'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $11     
          9        CONCAT                                           ~12     $11, '+rank+is+'
         10        CONCAT                                           ~13     ~12, !2
         11        CONCAT                                           ~14     ~13, '%0A'
         12        ECHO                                                     ~14
   11    13        UNSET_DIM                                                !0, !4
   12    14        INIT_FCALL                                               'in_array'
         15        SEND_VAR                                                 !3
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $15     
         18        BOOL_NOT                                         ~16     $15
         19      > JMPZ                                                     ~16, ->21
   13    20    >   PRE_INC                                                  !2
    8    21    > > JMP                                                      ->4
         22    >   FE_FREE                                                  $8
   17    23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.78 ms | 1395 KiB | 17 Q