3v4l.org

run code in 300+ PHP versions simultaneously
<?php $expr = '#^v?(?P<major>[0-9]+)\.(?P<minor>[0-9]+)(?:\.(?P<release>[0-9]+))?$#'; $val = 'v12.0'; preg_match($expr, $val, $match); var_dump($match);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6SoUP
function name:  (null)
number of ops:  11
compiled vars:  !0 = $expr, !1 = $val, !2 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%23%5Ev%3F%28%3FP%3Cmajor%3E%5B0-9%5D%2B%29%5C.%28%3FP%3Cminor%3E%5B0-9%5D%2B%29%28%3F%3A%5C.%28%3FP%3Crelease%3E%5B0-9%5D%2B%29%29%3F%24%23'
    4     1        ASSIGN                                                   !1, 'v12.0'
    5     2        INIT_FCALL                                               'preg_match'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        SEND_REF                                                 !2
          6        DO_ICALL                                                 
    7     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.37 ms | 1394 KiB | 17 Q