3v4l.org

run code in 500+ PHP versions simultaneously
<?php $text = 'test https://example.com//ita https://example.com lics// test // another // one'; var_export( preg_split( '~(?1)(?://\s*((?:https?://|.)*?)\s*//)?~', $text, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hXihR
function name:  (null)
number of ops:  11
compiled vars:  !0 = $text
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'test+https%3A%2F%2Fexample.com%2F%2Fita+https%3A%2F%2Fexample.com+lics%2F%2F+test+%2F%2F+another+%2F%2F+one'
    4     1        INIT_FCALL                                                   'var_export'
    5     2        INIT_FCALL                                                   'preg_split'
    6     3        SEND_VAL                                                     '%7E%28%3F1%29%28%3F%3A%2F%2F%5Cs%2A%28%28%3F%3Ahttps%3F%3A%2F%2F%7C.%29%2A%3F%29%5Cs%2A%2F%2F%29%3F%7E'
    7     4        SEND_VAR                                                     !0
    8     5        SEND_VAL                                                     -1
    9     6        SEND_VAL                                                     3
    5     7        DO_ICALL                                             $2      
    9     8        SEND_VAR                                                     $2
    4     9        DO_ICALL                                                     
   11    10      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
168.85 ms | 1591 KiB | 15 Q