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);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => '[many][more][other][tags][here]', 1 => 'and maybe some text here?', ) ---------------- array ( 0 => array ( 0 => '[many]', 1 => '[more]', 2 => '[other]', 3 => '[tags]', 4 => '[here]', ), 1 => 'and maybe some text here?', )

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
119.93 ms | 406 KiB | 5 Q