3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.77 ms | 1395 KiB | 17 Q