3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'Ch #RoKamb93 ajesop de Bourg #kin #kinnl 9 kunsho taffetas,bunughs rges, note florale,parfaite aseref'; $delimiters = array('#kin', '#kinnl', '#xxx'); $pattern = '/' . implode(array_map('preg_quote', $delimiters), '|') . '/'; $split = preg_split($pattern, $string); var_dump($split);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qNrEV
function name:  (null)
number of ops:  22
compiled vars:  !0 = $string, !1 = $delimiters, !2 = $pattern, !3 = $split
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Ch+%23RoKamb93+ajesop+de+Bourg+%23kin+%23kinnl+9+kunsho+taffetas%2Cbunughs+rges%2C+note+florale%2Cparfaite+aseref'
    5     1        ASSIGN                                                   !1, <array>
    6     2        INIT_FCALL                                               'implode'
          3        INIT_FCALL                                               'array_map'
          4        SEND_VAL                                                 'preg_quote'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $6      
          7        SEND_VAR                                                 $6
          8        SEND_VAL                                                 '%7C'
          9        DO_ICALL                                         $7      
         10        CONCAT                                           ~8      '%2F', $7
         11        CONCAT                                           ~9      ~8, '%2F'
         12        ASSIGN                                                   !2, ~9
    8    13        INIT_FCALL                                               'preg_split'
         14        SEND_VAR                                                 !2
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $11     
         17        ASSIGN                                                   !3, $11
    9    18        INIT_FCALL                                               'var_dump'
         19        SEND_VAR                                                 !3
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.49 ms | 1399 KiB | 21 Q