3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/\[\s*([^][|]*?)\s*\|\s*([^][]*?)\s*]/m'; $str = 'RE: Reply to me [Quote #341 | some-site]'; if (preg_match($re, $str, $match)) { array_shift($match); print_r($match); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 14
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/QTnGm
function name:  (null)
number of ops:  15
compiled vars:  !0 = $re, !1 = $str, !2 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2F%5C%5B%5Cs%2A%28%5B%5E%5D%5B%7C%5D%2A%3F%29%5Cs%2A%5C%7C%5Cs%2A%28%5B%5E%5D%5B%5D%2A%3F%29%5Cs%2A%5D%2Fm'
    4     1        ASSIGN                                                   !1, 'RE%3A+Reply+to+me+%5BQuote+%23341+%7C+some-site%5D'
    5     2        INIT_FCALL                                               'preg_match'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        SEND_REF                                                 !2
          6        DO_ICALL                                         $5      
          7      > JMPZ                                                     $5, ->14
    6     8    >   INIT_FCALL                                               'array_shift'
          9        SEND_REF                                                 !2
         10        DO_ICALL                                                 
    7    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                                 
    8    14    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.25 ms | 999 KiB | 16 Q