3v4l.org

run code in 300+ 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 ) );
Output for 8.1.0 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
array ( 0 => 'ita https://example.com lics', 1 => 'another', )

preferences:
69.42 ms | 980 KiB | 4 Q