3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = '12jan'; var_export( preg_split( '~(\d+)~', $string, 0, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE ) ); echo "\n---\n"; var_export( preg_split( '~(?:\d+|\D+)\K~', $string, 0, PREG_SPLIT_NO_EMPTY ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gV56K
function name:  (null)
number of ops:  21
compiled vars:  !0 = $string
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '12jan'
    5     1        INIT_FCALL                                                   'var_export'
    6     2        INIT_FCALL                                                   'preg_split'
    7     3        SEND_VAL                                                     '%7E%28%5Cd%2B%29%7E'
    8     4        SEND_VAR                                                     !0
    9     5        SEND_VAL                                                     0
   10     6        SEND_VAL                                                     3
    6     7        DO_ICALL                                             $2      
   10     8        SEND_VAR                                                     $2
    5     9        DO_ICALL                                                     
   14    10        ECHO                                                         '%0A---%0A'
   16    11        INIT_FCALL                                                   'var_export'
   17    12        INIT_FCALL                                                   'preg_split'
   18    13        SEND_VAL                                                     '%7E%28%3F%3A%5Cd%2B%7C%5CD%2B%29%5CK%7E'
   19    14        SEND_VAR                                                     !0
   20    15        SEND_VAL                                                     0
   21    16        SEND_VAL                                                     1
   17    17        DO_ICALL                                             $4      
   21    18        SEND_VAR                                                     $4
   16    19        DO_ICALL                                                     
   23    20      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
159.26 ms | 2008 KiB | 15 Q