3v4l.org

run code in 300+ PHP versions simultaneously
<?php $p = '~(?J)(z?)((?1)(?P<group>b)|(?P<group>a))ba~'; // works //$p = '~(?J)(z?)((?1)(?P<group>b)|(?P<group>a))b(?P=group)~'; // fails $s = 'aba'; if (preg_match($p, $s, $m)) { var_dump($m); }
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/jffS4
function name:  (null)
number of ops:  12
compiled vars:  !0 = $p, !1 = $s, !2 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7E%28%3FJ%29%28z%3F%29%28%28%3F1%29%28%3FP%3Cgroup%3Eb%29%7C%28%3FP%3Cgroup%3Ea%29%29ba%7E'
    5     1        ASSIGN                                                   !1, 'aba'
    8     2        INIT_FCALL                                               'preg_match'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        SEND_REF                                                 !2
          6        DO_ICALL                                         $5      
          7      > JMPZ                                                     $5, ->11
    9     8    >   INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                                 
   10    11    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.31 ms | 1394 KiB | 17 Q