3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = Array ( "0001" => 80 , "0002" => 71 , "0003" => 99, "0004" => 55.5, "0005" => 66 ); $i=1; //function getPosition($id,$array){ $position = ''; foreach($array as $array1){ $keys = array_keys($array); foreach($keys as $key){ // if($keys == $id) $key; } } // return $position; //} //echo getPosition('0001',$array).'here';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 14
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 14
Branch analysis from position: 5
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 12
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/SZmHq
function name:  (null)
number of ops:  16
compiled vars:  !0 = $array, !1 = $i, !2 = $position, !3 = $array1, !4 = $keys, !5 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, 1
    7     2        ASSIGN                                                   !2, ''
    8     3      > FE_RESET_R                                       $9      !0, ->14
          4    > > FE_FETCH_R                                               $9, !3, ->14
    9     5    >   INIT_FCALL                                               'array_keys'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $10     
          8        ASSIGN                                                   !4, $10
   10     9      > FE_RESET_R                                       $12     !4, ->12
         10    > > FE_FETCH_R                                               $12, !5, ->12
         11    > > JMP                                                      ->10
         12    >   FE_FREE                                                  $12
    8    13      > JMP                                                      ->4
         14    >   FE_FREE                                                  $9
   21    15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.2 ms | 1395 KiB | 15 Q