3v4l.org

run code in 300+ PHP versions simultaneously
<?php $search = '35'; $range = ''; $arr = [ '0' => '0;0', '1' => '20;0-20', '2' => '50;20-50', '3' => '100;50-100', '4' => '200;100-200', '5' => '500;200-500' ]; foreach ( $arr as $k => $v ) { $values = explode(";", $v); if ( $values[0] >= $search ) break; } echo "[".$k."] ".$values[1]; if($k>0||$less=0)$less = $k-1; echo "\n[".$less."]";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 16
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 16
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 15
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 47) Position 1 = 24, Position 2 = 26
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 29
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
Branch analysis from position: 26
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 16
Branch analysis from position: 16
filename:       /in/UW78L
function name:  (null)
number of ops:  33
compiled vars:  !0 = $search, !1 = $range, !2 = $arr, !3 = $v, !4 = $k, !5 = $values, !6 = $less
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '35'
    3     1        ASSIGN                                                   !1, ''
    5     2        ASSIGN                                                   !2, <array>
   14     3      > FE_RESET_R                                       $10     !2, ->16
          4    > > FE_FETCH_R                                       ~11     $10, !3, ->16
          5    >   ASSIGN                                                   !4, ~11
   15     6        INIT_FCALL                                               'explode'
          7        SEND_VAL                                                 '%3B'
          8        SEND_VAR                                                 !3
          9        DO_ICALL                                         $13     
         10        ASSIGN                                                   !5, $13
   16    11        FETCH_DIM_R                                      ~15     !5, 0
         12        IS_SMALLER_OR_EQUAL                                      !0, ~15
         13      > JMPZ                                                     ~16, ->15
         14    > > JMP                                                      ->16
   14    15    > > JMP                                                      ->4
         16    >   FE_FREE                                                  $10
   17    17        CONCAT                                           ~17     '%5B', !4
         18        CONCAT                                           ~18     ~17, '%5D+'
         19        FETCH_DIM_R                                      ~19     !5, 1
         20        CONCAT                                           ~20     ~18, ~19
         21        ECHO                                                     ~20
   18    22        IS_SMALLER                                       ~21     0, !4
         23      > JMPNZ_EX                                         ~21     ~21, ->26
         24    >   ASSIGN                                           ~22     !6, 0
         25        BOOL                                             ~21     ~22
         26    > > JMPZ                                                     ~21, ->29
         27    >   SUB                                              ~23     !4, 1
         28        ASSIGN                                                   !6, ~23
   19    29    >   CONCAT                                           ~25     '%0A%5B', !6
         30        CONCAT                                           ~26     ~25, '%5D'
         31        ECHO                                                     ~26
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.01 ms | 1388 KiB | 15 Q