3v4l.org

run code in 300+ PHP versions simultaneously
<?php $txt = <<<TXT First chunk doesn't start with any delimiter. ****** Second chunk is separated from the first one by six asterisks plus a carriage return. ****** Third chunk is separated from the second one by six asterisks plus a carriage return. ****** And son on... and on. ****** But we might find other asterisks, maybe six like ****** inside the paragraph, and those one are not to be split. Same for new lines without ****** which should stay the same. TXT; var_export( preg_split('/\R*^\*{6}$\R*/m', $txt, 0, PREG_SPLIT_NO_EMPTY) );
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => 'First chunk doesn\'t start with any delimiter.', 1 => 'Second chunk is separated from the first one by six asterisks plus a carriage return.', 2 => 'Third chunk is separated from the second one by six asterisks plus a carriage return.', 3 => 'And son on... and on.', 4 => 'But we might find other asterisks, maybe six like ****** inside the paragraph, and those one are not to be split. Same for new lines without ****** which should stay the same.', )

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:
27.21 ms | 406 KiB | 5 Q