3v4l.org

run code in 300+ PHP versions simultaneously
<?php $search = '.1'; $range; $arr = [ '0', '20' => '0-20', '50' => '20-50', '100' => '50-100', '200' => '100-200', '500' => '200-500' ]; foreach($arr as $k=>$v){ if($k >= $search){ $range=$v; return; } }echo $range; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 11
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/hpbYk
function name:  (null)
number of ops:  14
compiled vars:  !0 = $search, !1 = $range, !2 = $arr, !3 = $v, !4 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '.1'
    6     1        ASSIGN                                                   !2, <array>
   15     2      > FE_RESET_R                                       $7      !2, ->11
          3    > > FE_FETCH_R                                       ~8      $7, !3, ->11
          4    >   ASSIGN                                                   !4, ~8
   16     5        IS_SMALLER_OR_EQUAL                                      !0, !4
          6      > JMPZ                                                     ~10, ->10
   17     7    >   ASSIGN                                                   !1, !3
   18     8        FE_FREE                                                  $7
          9      > RETURN                                                   null
   15    10    > > JMP                                                      ->3
         11    >   FE_FREE                                                  $7
   20    12        ECHO                                                     !1
   22    13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.3 ms | 1393 KiB | 13 Q