3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = 'ab-123-asdf'; if (preg_match('/\w-(?P<num>\d+)-(\w)/', $s, $matches)) { var_dump($matches); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/VWvRk
function name:  (null)
number of ops:  11
compiled vars:  !0 = $s, !1 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'ab-123-asdf'
    4     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%2F%5Cw-%28%3FP%3Cnum%3E%5Cd%2B%29-%28%5Cw%29%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                         $3      
          6      > JMPZ                                                     $3, ->10
    5     7    >   INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
    6    10    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.27 ms | 999 KiB | 15 Q