3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = ['status.1', 'status.2', 'status.3', 'country.244', 'country.24', 'country.845', 'pm.4', 'pm.9', 'pm.6']; $result = []; foreach ($data as $value) { [$prefix, $result[$prefix][]] = sscanf($value, '%[^.].%d'); } var_export($result);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 'status' => array ( 0 => 1, 1 => 2, 2 => 3, ), 'country' => array ( 0 => 244, 1 => 24, 2 => 845, ), 'pm' => array ( 0 => 4, 1 => 9, 2 => 6, ), )

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:
151.25 ms | 405 KiB | 5 Q