3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = "å\nä"; var_export(preg_split('/.\K/u', $string, 0, PREG_SPLIT_NO_EMPTY)); echo "\n---\n"; var_export(preg_split('/.\K/us', $string, 0, PREG_SPLIT_NO_EMPTY)); echo "\n---\n"; var_export(preg_split('/\X\K/u', $string, 0, PREG_SPLIT_NO_EMPTY));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CU4eH
function name:  (null)
number of ops:  31
compiled vars:  !0 = $string
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%C3%A5%0A%C3%A4'
    5     1        INIT_FCALL                                                   'var_export'
          2        INIT_FCALL                                                   'preg_split'
          3        SEND_VAL                                                     '%2F.%5CK%2Fu'
          4        SEND_VAR                                                     !0
          5        SEND_VAL                                                     0
          6        SEND_VAL                                                     1
          7        DO_ICALL                                             $2      
          8        SEND_VAR                                                     $2
          9        DO_ICALL                                                     
    6    10        ECHO                                                         '%0A---%0A'
    7    11        INIT_FCALL                                                   'var_export'
         12        INIT_FCALL                                                   'preg_split'
         13        SEND_VAL                                                     '%2F.%5CK%2Fus'
         14        SEND_VAR                                                     !0
         15        SEND_VAL                                                     0
         16        SEND_VAL                                                     1
         17        DO_ICALL                                             $4      
         18        SEND_VAR                                                     $4
         19        DO_ICALL                                                     
    8    20        ECHO                                                         '%0A---%0A'
    9    21        INIT_FCALL                                                   'var_export'
         22        INIT_FCALL                                                   'preg_split'
         23        SEND_VAL                                                     '%2F%5CX%5CK%2Fu'
         24        SEND_VAR                                                     !0
         25        SEND_VAL                                                     0
         26        SEND_VAL                                                     1
         27        DO_ICALL                                             $6      
         28        SEND_VAR                                                     $6
         29        DO_ICALL                                                     
         30      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.99 ms | 2027 KiB | 15 Q