3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'Hello. A question? How strange! Maybe even surreal!? Who knows.'; var_export( preg_split( '/(!\?|[!?.])/', $string, 0, PREG_SPLIT_DELIM_CAPTURE ) ); echo "\n\n"; var_export( preg_split( '/(!\?|[!?.])/', $string, -1, PREG_SPLIT_DELIM_CAPTURE ) ); echo "\n\n"; var_export( preg_split( '/(!\?|[!?.])/', $string, null, PREG_SPLIT_DELIM_CAPTURE ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LioCd
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, 'Hello.+A+question%3F+How+strange%21+Maybe+even+surreal%21%3F+Who+knows.'
    5     1        INIT_FCALL                                               'var_export'
    6     2        INIT_FCALL                                               'preg_split'
    7     3        SEND_VAL                                                 '%2F%28%21%5C%3F%7C%5B%21%3F.%5D%29%2F'
    8     4        SEND_VAR                                                 !0
    9     5        SEND_VAL                                                 0
   10     6        SEND_VAL                                                 2
    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                                                 '%2F%28%21%5C%3F%7C%5B%21%3F.%5D%29%2F'
   19    14        SEND_VAR                                                 !0
   20    15        SEND_VAL                                                 -1
   21    16        SEND_VAL                                                 2
   17    17        DO_ICALL                                         $4      
   21    18        SEND_VAR                                                 $4
   16    19        DO_ICALL                                                 
   25    20        ECHO                                                     '%0A%0A'
   27    21        INIT_FCALL                                               'var_export'
   28    22        INIT_FCALL                                               'preg_split'
   29    23        SEND_VAL                                                 '%2F%28%21%5C%3F%7C%5B%21%3F.%5D%29%2F'
   30    24        SEND_VAR                                                 !0
   31    25        SEND_VAL                                                 null
   32    26        SEND_VAL                                                 2
   28    27        DO_ICALL                                         $6      
   32    28        SEND_VAR                                                 $6
   27    29        DO_ICALL                                                 
   34    30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.59 ms | 1004 KiB | 15 Q