3v4l.org

run code in 300+ PHP versions simultaneously
<?php $p = '/([a-z0-9]+\*(?:$|\s+))|([^\s]+)/'; $a = array('Optionsschei*', 'optionsschei*', 'Optionsschein', 'optionsschein', 'Optionsschei* test', 'optionsschei* test'); foreach ($a as $q) { echo "\n$q"; $res = preg_match_all($p, $q, $m); var_dump($m); var_dump($res); }
Output for git.master, git.master_jit, rfc.property-hooks
Optionsschei*array(3) { [0]=> array(1) { [0]=> string(13) "Optionsschei*" } [1]=> array(1) { [0]=> string(0) "" } [2]=> array(1) { [0]=> string(13) "Optionsschei*" } } int(1) optionsschei*array(3) { [0]=> array(1) { [0]=> string(13) "optionsschei*" } [1]=> array(1) { [0]=> string(13) "optionsschei*" } [2]=> array(1) { [0]=> string(0) "" } } int(1) Optionsscheinarray(3) { [0]=> array(1) { [0]=> string(13) "Optionsschein" } [1]=> array(1) { [0]=> string(0) "" } [2]=> array(1) { [0]=> string(13) "Optionsschein" } } int(1) optionsscheinarray(3) { [0]=> array(1) { [0]=> string(13) "optionsschein" } [1]=> array(1) { [0]=> string(0) "" } [2]=> array(1) { [0]=> string(13) "optionsschein" } } int(1) Optionsschei* testarray(3) { [0]=> array(2) { [0]=> string(13) "Optionsschei*" [1]=> string(4) "test" } [1]=> array(2) { [0]=> string(0) "" [1]=> string(0) "" } [2]=> array(2) { [0]=> string(13) "Optionsschei*" [1]=> string(4) "test" } } int(2) optionsschei* testarray(3) { [0]=> array(2) { [0]=> string(14) "optionsschei* " [1]=> string(4) "test" } [1]=> array(2) { [0]=> string(14) "optionsschei* " [1]=> string(0) "" } [2]=> array(2) { [0]=> string(0) "" [1]=> string(4) "test" } } int(2)

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:
58.06 ms | 404 KiB | 8 Q