3v4l.org

run code in 500+ PHP versions simultaneously
<?php $yourstring='C7,22801422CFE0F63,2280141C5EF0F63,22801402EFD0F63,2280138C5ED0F63,228024329897530,228023829877530'; $pattern = '~ (?!^)(\h*,\h*(?<value>[0-9]{7}[A-F0-9]{8})) | (?<first>[a-zA-Z0-9]+)(?=(?1)*$) ~xA'; if ( preg_match_all($pattern, $yourstring, $matches) ) { echo $matches['first'][0], PHP_EOL; print_r(array_values(array_filter($matches['value']))); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 22
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/37VEo
function name:  (null)
number of ops:  23
compiled vars:  !0 = $yourstring, !1 = $pattern, !2 = $matches
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'C7%2C22801422CFE0F63%2C2280141C5EF0F63%2C22801402EFD0F63%2C2280138C5ED0F63%2C228024329897530%2C228023829877530'
    6     1        ASSIGN                                                       !1, '%7E%0A++++++++%28%3F%21%5E%29%28%5Ch%2A%2C%5Ch%2A%28%3F%3Cvalue%3E%5B0-9%5D%7B7%7D%5BA-F0-9%5D%7B8%7D%29%29%0A++++++%7C%0A++++++++%28%3F%3Cfirst%3E%5Ba-zA-Z0-9%5D%2B%29%28%3F%3D%28%3F1%29%2A%24%29%0A++++%7ExA'
   12     2        INIT_FCALL                                                   'preg_match_all'
          3        SEND_VAR                                                     !1
          4        SEND_VAR                                                     !0
          5        SEND_REF                                                     !2
          6        DO_ICALL                                             $5      
          7      > JMPZ                                                         $5, ->22
   13     8    >   FETCH_DIM_R                                          ~6      !2, 'first'
          9        FETCH_DIM_R                                          ~7      ~6, 0
         10        ECHO                                                         ~7
         11        ECHO                                                         '%0A'
   14    12        INIT_FCALL                                                   'print_r'
         13        INIT_FCALL                                                   'array_values'
         14        INIT_FCALL                                                   'array_filter'
         15        FETCH_DIM_R                                          ~8      !2, 'value'
         16        SEND_VAL                                                     ~8
         17        DO_ICALL                                             $9      
         18        SEND_VAR                                                     $9
         19        DO_ICALL                                             $10     
         20        SEND_VAR                                                     $10
         21        DO_ICALL                                                     
   15    22    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.11 ms | 2602 KiB | 17 Q