3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = [ '133|mickmackusa|100|90|500', '133|mickmackusa|100|90', '133|mickmackusa|100', '133|mickmackusa', '133', '', ]; foreach ($tests as $test) { $matches = sscanf($test, '%d|%[^|]|%d|%d|%d', $user_id, $name, $limit, $remaining, $reset); var_export([ 'matches' => $matches, 'user_id' => $user_id, 'name' => $name, 'limit' => $limit, 'remaining' => $remaining, 'reset' => $reset ]); echo "\n"; unset($matches, $user_id, $name, $limit, $remaining, $reset); }
Output for git.master, git.master_jit, rfc.property-hooks
array ( 'matches' => 5, 'user_id' => 133, 'name' => 'mickmackusa', 'limit' => 100, 'remaining' => 90, 'reset' => 500, ) array ( 'matches' => 4, 'user_id' => 133, 'name' => 'mickmackusa', 'limit' => 100, 'remaining' => 90, 'reset' => NULL, ) array ( 'matches' => 3, 'user_id' => 133, 'name' => 'mickmackusa', 'limit' => 100, 'remaining' => NULL, 'reset' => NULL, ) array ( 'matches' => 2, 'user_id' => 133, 'name' => 'mickmackusa', 'limit' => NULL, 'remaining' => NULL, 'reset' => NULL, ) array ( 'matches' => 1, 'user_id' => 133, 'name' => NULL, 'limit' => NULL, 'remaining' => NULL, 'reset' => NULL, ) array ( 'matches' => -1, 'user_id' => NULL, 'name' => NULL, 'limit' => NULL, 'remaining' => NULL, 'reset' => 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:
73.74 ms | 407 KiB | 5 Q