3v4l.org

run code in 300+ PHP versions simultaneously
<?php $word = "$1$s"; if(preg_match('/\$[1-9]{1}\$s/' ,$word)){ echo 'true'; } else { echo 'false'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uZgoV
function name:  (null)
number of ops:  12
compiled vars:  !0 = $word, !1 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NOP                                                      
          1        FAST_CONCAT                                      ~2      '%241', !1
          2        ASSIGN                                                   !0, ~2
    5     3        INIT_FCALL                                               'preg_match'
          4        SEND_VAL                                                 '%2F%5C%24%5B1-9%5D%7B1%7D%5C%24s%2F'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
          7      > JMPZ                                                     $4, ->10
    6     8    >   ECHO                                                     'true'
          9      > JMP                                                      ->11
    8    10    >   ECHO                                                     'false'
    9    11    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.75 ms | 1394 KiB | 15 Q