3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = "4.3"; $string = "4.2 MM - 4.4MM (30PTS)"; preg_match_all("/([0-9.]+)\s*MM/", $string, $matches); // var_dump($matches[1][0], $matches[1][1]); if($value>=$matches[1][0] && $value<=$matches[1][1]) { echo "Yes in range."; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 17
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
Branch analysis from position: 15
filename:       /in/TcnOc
function name:  (null)
number of ops:  18
compiled vars:  !0 = $value, !1 = $string, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '4.3'
    5     1        ASSIGN                                                   !1, '4.2+MM+-+4.4MM+%2830PTS%29'
    7     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAL                                                 '%2F%28%5B0-9.%5D%2B%29%5Cs%2AMM%2F'
          4        SEND_VAR                                                 !1
          5        SEND_REF                                                 !2
          6        DO_ICALL                                                 
   11     7        FETCH_DIM_R                                      ~6      !2, 1
          8        FETCH_DIM_R                                      ~7      ~6, 0
          9        IS_SMALLER_OR_EQUAL                              ~8      ~7, !0
         10      > JMPZ_EX                                          ~8      ~8, ->15
         11    >   FETCH_DIM_R                                      ~9      !2, 1
         12        FETCH_DIM_R                                      ~10     ~9, 1
         13        IS_SMALLER_OR_EQUAL                              ~11     !0, ~10
         14        BOOL                                             ~8      ~11
         15    > > JMPZ                                                     ~8, ->17
   13    16    >   ECHO                                                     'Yes+in+range.'
   14    17    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.57 ms | 1386 KiB | 15 Q