3v4l.org

run code in 300+ PHP versions simultaneously
<?php $commands = [ ',simpleImage. query Dark background. width 200. height 200. text %fortune_teller%', ',sayHello. %custom_id%', ',cmd. cat files.txt 2>/dev/null && find $HOME -type f -iname \*.mp3 -delete', ]; foreach ($commands as $command) { echo var_export(preg_match_all('~(?:^,([^.]+)|\G(?!^))\.(?= )(?: (\S+))? (.+?(?=\. |$))~', $command, $out) ? $out : [], true) . "\n--\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => array ( 0 => ',simpleImage. query Dark background', 1 => '. width 200', 2 => '. height 200', 3 => '. text %fortune_teller%', ), 1 => array ( 0 => 'simpleImage', 1 => '', 2 => '', 3 => '', ), 2 => array ( 0 => 'query', 1 => 'width', 2 => 'height', 3 => 'text', ), 3 => array ( 0 => 'Dark background', 1 => '200', 2 => '200', 3 => '%fortune_teller%', ), ) -- array ( 0 => array ( 0 => ',sayHello. %custom_id%', ), 1 => array ( 0 => 'sayHello', ), 2 => array ( 0 => '', ), 3 => array ( 0 => '%custom_id%', ), ) -- array ( 0 => array ( 0 => ',cmd. cat files.txt 2>/dev/null && find $HOME -type f -iname \\*.mp3 -delete', ), 1 => array ( 0 => 'cmd', ), 2 => array ( 0 => 'cat', ), 3 => array ( 0 => 'files.txt 2>/dev/null && find $HOME -type f -iname \\*.mp3 -delete', ), ) --

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:
57.13 ms | 403 KiB | 8 Q