3v4l.org

run code in 300+ PHP versions simultaneously
<?php $subject = "Helló"; $pattern = '/(l|ó){2,3}/u'; preg_match($pattern, substr($subject,3), $matches, PREG_OFFSET_CAPTURE); var_dump($matches); $pattern = '/(l|ó){2,3}/'; preg_match($pattern, substr($subject,3), $matches, PREG_OFFSET_CAPTURE); var_dump($matches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/C99Zr
function name:  (null)
number of ops:  30
compiled vars:  !0 = $subject, !1 = $pattern, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Hell%C3%B3'
    4     1        ASSIGN                                                   !1, '%2F%28l%7C%C3%B3%29%7B2%2C3%7D%2Fu'
    5     2        INIT_FCALL                                               'preg_match'
          3        SEND_VAR                                                 !1
          4        INIT_FCALL                                               'substr'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 3
          7        DO_ICALL                                         $5      
          8        SEND_VAR                                                 $5
          9        SEND_REF                                                 !2
         10        SEND_VAL                                                 256
         11        DO_ICALL                                                 
    7    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                                 
    9    15        ASSIGN                                                   !1, '%2F%28l%7C%C3%B3%29%7B2%2C3%7D%2F'
   10    16        INIT_FCALL                                               'preg_match'
         17        SEND_VAR                                                 !1
         18        INIT_FCALL                                               'substr'
         19        SEND_VAR                                                 !0
         20        SEND_VAL                                                 3
         21        DO_ICALL                                         $9      
         22        SEND_VAR                                                 $9
         23        SEND_REF                                                 !2
         24        SEND_VAL                                                 256
         25        DO_ICALL                                                 
   12    26        INIT_FCALL                                               'var_dump'
         27        SEND_VAR                                                 !2
         28        DO_ICALL                                                 
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.82 ms | 1395 KiB | 19 Q