3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = '{1|{1078} {*|{1079}-}test{1|{4829}, test2 {4457}}} {*|{1078} {*|{1079}-}test3{1|{4829}, test4 {23232}}}'; if (preg_match_all('~\|\{(\d+)}~', $s, $matches)) { print_r(array_unique($matches[1])); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 14
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/BiGEp
function name:  (null)
number of ops:  15
compiled vars:  !0 = $s, !1 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7B1%7C%7B1078%7D+%7B%2A%7C%7B1079%7D-%7Dtest%7B1%7C%7B4829%7D%2C+test2+%7B4457%7D%7D%7D+%7B%2A%7C%7B1078%7D+%7B%2A%7C%7B1079%7D-%7Dtest3%7B1%7C%7B4829%7D%2C+test4+%7B23232%7D%7D%7D'
    4     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%7E%5C%7C%5C%7B%28%5Cd%2B%29%7D%7E'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                         $3      
          6      > JMPZ                                                     $3, ->14
    5     7    >   INIT_FCALL                                               'print_r'
          8        INIT_FCALL                                               'array_unique'
          9        FETCH_DIM_R                                      ~4      !1, 1
         10        SEND_VAL                                                 ~4
         11        DO_ICALL                                         $5      
         12        SEND_VAR                                                 $5
         13        DO_ICALL                                                 
    6    14    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.59 ms | 1438 KiB | 16 Q