3v4l.org

run code in 300+ PHP versions simultaneously
<?php $numbers = array(1105,2140,3170); $start = 1000; $end = 1500; $result = []; foreach($numbers as $num){ if($num >= $start && $num <= $end) $result[] = $num; } print_r($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 14
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 14
Branch analysis from position: 6
2 jumps found. (Code = 46) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 13
Branch analysis from position: 10
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/D1Rfu
function name:  (null)
number of ops:  19
compiled vars:  !0 = $numbers, !1 = $start, !2 = $end, !3 = $result, !4 = $num
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, 1000
    6     2        ASSIGN                                                   !2, 1500
    8     3        ASSIGN                                                   !3, <array>
   10     4      > FE_RESET_R                                       $9      !0, ->14
          5    > > FE_FETCH_R                                               $9, !4, ->14
   11     6    >   IS_SMALLER_OR_EQUAL                              ~10     !1, !4
          7      > JMPZ_EX                                          ~10     ~10, ->10
          8    >   IS_SMALLER_OR_EQUAL                              ~11     !4, !2
          9        BOOL                                             ~10     ~11
         10    > > JMPZ                                                     ~10, ->13
         11    >   ASSIGN_DIM                                               !3
         12        OP_DATA                                                  !4
   10    13    > > JMP                                                      ->5
         14    >   FE_FREE                                                  $9
   14    15        INIT_FCALL                                               'print_r'
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.37 ms | 1395 KiB | 15 Q