3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test(string $str): void { if (preg_match('~a|(u(x))|(v(y))~', $str, $matches) === 1) { var_dump($matches); } } test("vy");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VgCUJ
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'test'
          1        SEND_VAL                                                 'vy'
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 11
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/VgCUJ
function name:  test
number of ops:  12
compiled vars:  !0 = $str, !1 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%7Ea%7C%28u%28x%29%29%7C%28v%28y%29%29%7E'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                         $2      
          6        IS_IDENTICAL                                             $2, 1
          7      > JMPZ                                                     ~3, ->11
    6     8    >   INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
    8    11    > > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.7 ms | 1000 KiB | 16 Q