3v4l.org

run code in 300+ PHP versions simultaneously
<?php $subject = "801"; $pattern = '8[0,9]'; preg_match($pattern, substr($subject,3), $matches, PREG_OFFSET_CAPTURE); print_r($matches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6SnsA
function name:  (null)
number of ops:  16
compiled vars:  !0 = $subject, !1 = $pattern, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '801'
    3     1        ASSIGN                                                   !1, '8%5B0%2C9%5D'
    4     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                                                 
    5    12        INIT_FCALL                                               'print_r'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.26 ms | 1394 KiB | 19 Q