3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = 'write {Hello, World!} in either the color {blue} or {red} or {#00AA00} and in either the font {Arial Black} or {Monaco} where both the color and the font are determined randomly'; var_export(preg_split('~({[^}]*}|\S+)\K ~', $text));
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => 'write', 1 => '{Hello, World!}', 2 => 'in', 3 => 'either', 4 => 'the', 5 => 'color', 6 => '{blue}', 7 => 'or', 8 => '{red}', 9 => 'or', 10 => '{#00AA00}', 11 => 'and', 12 => 'in', 13 => 'either', 14 => 'the', 15 => 'font', 16 => '{Arial Black}', 17 => 'or', 18 => '{Monaco}', 19 => 'where', 20 => 'both', 21 => 'the', 22 => 'color', 23 => 'and', 24 => 'the', 25 => 'font', 26 => 'are', 27 => 'determined', 28 => 'randomly', )

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.49 ms | 406 KiB | 5 Q