3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = [ '', 'nothing here', 'something<snip>here', false, 0, null, ]; foreach( $data as $text ) { $textarr = preg_split( '/(<.*>)/U', $text, -1, PREG_SPLIT_DELIM_CAPTURE ); var_dump($textarr); }
Output for git.master_jit, git.master, rfc.property-hooks
array(1) { [0]=> string(0) "" } array(1) { [0]=> string(12) "nothing here" } array(3) { [0]=> string(9) "something" [1]=> string(6) "<snip>" [2]=> string(4) "here" } array(1) { [0]=> string(0) "" } array(1) { [0]=> string(1) "0" } Deprecated: preg_split(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/N3t8W on line 14 array(1) { [0]=> 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:
74.55 ms | 406 KiB | 5 Q