3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = '/\b' . preg_quote('Ro(M)', '/') . '\b/u'; $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/1jknO
function name:  (null)
number of ops:  20
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        SEND_VAL                                                 '%2F'
          3        DO_ICALL                                         $3      
          4        CONCAT                                           ~4      '%2F%5Cb', $3
          5        CONCAT                                           ~5      ~4, '%5Cb%2Fu'
          6        ASSIGN                                                   !0, ~5
    3     7        ASSIGN                                                   !1, 'Ro%28M%29'
    4     8        INIT_FCALL                                               'preg_match'
          9        SEND_VAR                                                 !0
         10        SEND_VAR                                                 !1
         11        SEND_REF                                                 !2
         12        DO_ICALL                                         $8      
         13        CAST                                          4  ~9      $8
         14        CONCAT                                           ~10     ~9, '%0A'
         15        ECHO                                                     ~10
    5    16        INIT_FCALL                                               'print_r'
         17        SEND_VAR                                                 !2
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.26 ms | 1395 KiB | 19 Q