3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = "AAA"; preg_match('/A+A/', $s, $m); var_dump($m); preg_match('/A+?A/', $s, $m); var_dump($m); preg_match('/A++A/', $s, $m); var_dump($m);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tTMmT
function name:  (null)
number of ops:  26
compiled vars:  !0 = $s, !1 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'AAA'
    4     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%2FA%2BA%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                                 
    5     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
    7     9        INIT_FCALL                                               'preg_match'
         10        SEND_VAL                                                 '%2FA%2B%3FA%2F'
         11        SEND_VAR                                                 !0
         12        SEND_REF                                                 !1
         13        DO_ICALL                                                 
    8    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                                 
   10    17        INIT_FCALL                                               'preg_match'
         18        SEND_VAL                                                 '%2FA%2B%2BA%2F'
         19        SEND_VAR                                                 !0
         20        SEND_REF                                                 !1
         21        DO_ICALL                                                 
   11    22        INIT_FCALL                                               'var_dump'
         23        SEND_VAR                                                 !1
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.24 ms | 1395 KiB | 17 Q