3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'Hello how are you<br>Foo bar hello'; $array = preg_split( '/(?:(?<=\s)\s*|\b)|(<br>)/', $str, -1, PREG_SPLIT_DELIM_CAPTURE); var_dump( $array);
Output for git.master, git.master_jit, rfc.property-hooks
array(17) { [0]=> string(0) "" [1]=> string(5) "Hello" [2]=> string(1) " " [3]=> string(3) "how" [4]=> string(1) " " [5]=> string(3) "are" [6]=> string(1) " " [7]=> string(3) "you" [8]=> string(0) "" [9]=> string(4) "<br>" [10]=> string(0) "" [11]=> string(3) "Foo" [12]=> string(1) " " [13]=> string(3) "bar" [14]=> string(1) " " [15]=> string(5) "hello" [16]=> string(0) "" }

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:
33.46 ms | 402 KiB | 8 Q