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); // if($keys == $id){ // $position = $array1; //} echo $keys; } echo $position; //} //echo getPosition('0001',$array).'here';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 11
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/IRZXC
function name:  (null)
number of ops:  14
compiled vars:  !0 = $array, !1 = $i, !2 = $position, !3 = $array1, !4 = $keys
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                                       $8      !0, ->11
          4    > > FE_FETCH_R                                               $8, !3, ->11
    9     5    >   INIT_FCALL                                               'array_keys'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $9      
          8        ASSIGN                                                   !4, $9
   13     9        ECHO                                                     !4
    8    10      > JMP                                                      ->4
         11    >   FE_FREE                                                  $8
   15    12        ECHO                                                     !2
   18    13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.08 ms | 1394 KiB | 15 Q