3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = "Some text [many][more][other][tags][here] and maybe some text here?"; $split = explode(' ', strstr($input, '['), 2); var_export($split); echo "\n----------------\n"; $split[0] = preg_split('~]\K~', $split[0], -1, PREG_SPLIT_NO_EMPTY); var_export($split);

preferences:
25.31 ms | 407 KiB | 5 Q