3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = '/\b' . preg_quote('Ro(M)') . '\b/ui'; $sample = 'Ro(M)'; echo (int)preg_match( $pattern, $sample, $matches).PHP_EOL; print_r($matches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Rscr3
function name:  (null)
number of ops:  19
compiled vars:  !0 = $pattern, !1 = $sample, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'preg_quote'
          1        SEND_VAL                                                 'Ro%28M%29'
          2        DO_ICALL                                         $3      
          3        CONCAT                                           ~4      '%2F%5Cb', $3
          4        CONCAT                                           ~5      ~4, '%5Cb%2Fui'
          5        ASSIGN                                                   !0, ~5
    3     6        ASSIGN                                                   !1, 'Ro%28M%29'
    4     7        INIT_FCALL                                               'preg_match'
          8        SEND_VAR                                                 !0
          9        SEND_VAR                                                 !1
         10        SEND_REF                                                 !2
         11        DO_ICALL                                         $8      
         12        CAST                                          4  ~9      $8
         13        CONCAT                                           ~10     ~9, '%0A'
         14        ECHO                                                     ~10
    5    15        INIT_FCALL                                               'print_r'
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
190.07 ms | 1394 KiB | 19 Q