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 "\n".max($array)." rank is ". $i."\n";print_r($array); 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 = 26
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 26
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 25
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 25
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/dhdJD
function name:  (null)
number of ops:  28
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, ->26
          4    > > FE_FETCH_R                                       ~9      $8, !3, ->26
          5    >   ASSIGN                                                   !4, ~9
   10     6        INIT_FCALL                                               'max'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $11     
          9        CONCAT                                           ~12     '%0A', $11
         10        CONCAT                                           ~13     ~12, '+rank+is+'
         11        CONCAT                                           ~14     ~13, !2
         12        CONCAT                                           ~15     ~14, '%0A'
         13        ECHO                                                     ~15
         14        INIT_FCALL                                               'print_r'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                                 
   11    17        UNSET_DIM                                                !0, !4
   12    18        INIT_FCALL                                               'in_array'
         19        SEND_VAR                                                 !3
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                         $17     
         22        BOOL_NOT                                         ~18     $17
         23      > JMPZ                                                     ~18, ->25
   13    24    >   PRE_INC                                                  !2
    8    25    > > JMP                                                      ->4
         26    >   FE_FREE                                                  $8
   15    27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.59 ms | 1396 KiB | 19 Q