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 = 19, Position 2 = 23
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 25
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
Branch analysis from position: 23
filename:       /in/Wgt8u
function name:  (null)
number of ops:  26
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                                                 
    9     7        INIT_FCALL                                               'var_dump'
          8        FETCH_DIM_R                                      ~6      !2, 1
          9        FETCH_DIM_R                                      ~7      ~6, 0
         10        SEND_VAL                                                 ~7
         11        FETCH_DIM_R                                      ~8      !2, 1
         12        FETCH_DIM_R                                      ~9      ~8, 1
         13        SEND_VAL                                                 ~9
         14        DO_ICALL                                                 
   11    15        FETCH_DIM_R                                      ~11     !2, 1
         16        FETCH_DIM_R                                      ~12     ~11, 0
         17        IS_SMALLER_OR_EQUAL                              ~13     ~12, !0
         18      > JMPZ_EX                                          ~13     ~13, ->23
         19    >   FETCH_DIM_R                                      ~14     !2, 1
         20        FETCH_DIM_R                                      ~15     ~14, 1
         21        IS_SMALLER_OR_EQUAL                              ~16     !0, ~15
         22        BOOL                                             ~13     ~16
         23    > > JMPZ                                                     ~13, ->25
   13    24    >   ECHO                                                     'Yes+in+range.'
   14    25    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.09 ms | 1395 KiB | 17 Q