3v4l.org

run code in 500+ PHP versions simultaneously
<?php $txt = <<<TXT Foodbar: +8; Barredfu: -91% TXT; $result = []; foreach (explode("\n", $txt) as $line) { sscanf( $line, '%[^:]:%[+-]%d%[%]', $attr, $result[$attr]['sign'], $result[$attr]['numb'], $result[$attr]['perc'] ); } var_export($result);
Output for git.master_jit, git.master
Deprecated: Using null as an array offset is deprecated, use an empty string instead in /in/9VnSU on line 14 Deprecated: Using null as an array offset is deprecated, use an empty string instead in /in/9VnSU on line 15 Deprecated: Using null as an array offset is deprecated, use an empty string instead in /in/9VnSU on line 16 array ( '' => array ( 'sign' => NULL, 'numb' => NULL, 'perc' => NULL, ), 'Foodbar' => array ( 'sign' => NULL, 'numb' => NULL, 'perc' => NULL, ), )

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:
39.24 ms | 712 KiB | 4 Q