3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "2012-1-12 51:00:00.5"; var_export(sscanf($string, '%d-%d-%d %d:%d:%d%f')); echo "\n---\n"; var_export(sscanf($string, '%d-%d-%d %d:%d:%d.%d')); echo "\n---\n"; var_export(sscanf($string, '%d-%d-%d %d:%d:%f')); echo "\n---\n"; var_export(sscanf($string, '%d-%d-%d %d:%d:%d')); echo "\n---\n"; var_export(sscanf($string, '%[^-]-%[^-]-%[^ ] %[^:]:%[^:]:%[^.].%s')); echo "\n---\n"; var_export(sscanf($string, '%[^-]-%[^-]-%[^ ] %[^:]:%[^:]:%[^.]')); echo "\n---\n"; var_export(preg_split('/\D/', $string));
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => 2012, 1 => 1, 2 => 12, 3 => 51, 4 => 0, 5 => 0, 6 => 0.5, ) --- array ( 0 => 2012, 1 => 1, 2 => 12, 3 => 51, 4 => 0, 5 => 0, 6 => 5, ) --- array ( 0 => 2012, 1 => 1, 2 => 12, 3 => 51, 4 => 0, 5 => 0.5, ) --- array ( 0 => 2012, 1 => 1, 2 => 12, 3 => 51, 4 => 0, 5 => 0, ) --- array ( 0 => '2012', 1 => '1', 2 => '12', 3 => '51', 4 => '00', 5 => '00', 6 => '5', ) --- array ( 0 => '2012', 1 => '1', 2 => '12', 3 => '51', 4 => '00', 5 => '00', ) --- array ( 0 => '2012', 1 => '1', 2 => '12', 3 => '51', 4 => '00', 5 => '00', 6 => '5', )

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