3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "matrixrate_matrixrate_2"; $clean = str_replace('matrixrate_matrixrate_','',$text); echo is_numeric($clean); $rate = 'matrixrate_10'; preg_match("/^(matrixrate_matrixrate_)([0-9]*)/", $rate, $matches); print_r($matches); if(array_key_exists('2',$matches)) { echo "Yeah"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 23
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/G1Gtc
function name:  (null)
number of ops:  24
compiled vars:  !0 = $text, !1 = $clean, !2 = $rate, !3 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'matrixrate_matrixrate_2'
    4     1        INIT_FCALL                                               'str_replace'
          2        SEND_VAL                                                 'matrixrate_matrixrate_'
          3        SEND_VAL                                                 ''
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !1, $5
    6     7        INIT_FCALL                                               'is_numeric'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $7      
         10        ECHO                                                     $7
    8    11        ASSIGN                                                   !2, 'matrixrate_10'
    9    12        INIT_FCALL                                               'preg_match'
         13        SEND_VAL                                                 '%2F%5E%28matrixrate_matrixrate_%29%28%5B0-9%5D%2A%29%2F'
         14        SEND_VAR                                                 !2
         15        SEND_REF                                                 !3
         16        DO_ICALL                                                 
   10    17        INIT_FCALL                                               'print_r'
         18        SEND_VAR                                                 !3
         19        DO_ICALL                                                 
   12    20        ARRAY_KEY_EXISTS                                         '2', !3
         21      > JMPZ                                                     ~11, ->23
   13    22    >   ECHO                                                     'Yeah'
   14    23    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.82 ms | 1387 KiB | 21 Q