3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = "foo bar, php js double-space apo'strophe 9"; echo 'explode(): '; var_export(explode(' ', $input)); echo "\npreg_split(): "; var_export(preg_split('/ +/', $input, null, PREG_SPLIT_NO_EMPTY)); echo "\nstr_word_count(): "; var_export(str_word_count($input, 1)); echo "\npreg_match_all(): "; var_export(preg_match_all('/[a-z]+/', $input, $output) ? $output[0]: []);
Output for git.master, git.master_jit, rfc.property-hooks
explode(): array ( 0 => 'foo', 1 => 'bar,', 2 => 'php', 3 => 'js', 4 => '', 5 => 'double-space', 6 => 'apo\'strophe', 7 => '9', ) preg_split(): Deprecated: preg_split(): Passing null to parameter #3 ($limit) of type int is deprecated in /in/Rslib on line 6 array ( 0 => 'foo', 1 => 'bar,', 2 => 'php', 3 => 'js', 4 => 'double-space', 5 => 'apo\'strophe', 6 => '9', ) str_word_count(): array ( 0 => 'foo', 1 => 'bar', 2 => 'php', 3 => 'js', 4 => 'double-space', 5 => 'apo\'strophe', ) preg_match_all(): array ( 0 => 'foo', 1 => 'bar', 2 => 'php', 3 => 'js', 4 => 'double', 5 => 'space', 6 => 'apo', 7 => 'strophe', )

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:
110.54 ms | 407 KiB | 5 Q