3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = '05/21/1982'; sscanf($date, '%[^/]/%[^/]/%s', $m, $d, $y); var_export(compact(['d','m','y'])); var_export(sscanf($date, '%[^/]/%[^/]/%s')); var_export(sscanf($date, '%d/%d/%d')); $dateObject = DateTime::createFromFormat('m/d/Y', $date); var_export([ $dateObject->format('m'), $dateObject->format('d'), $dateObject->format('Y') ]);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 'd' => '21', 'm' => '05', 'y' => '1982', )array ( 0 => '05', 1 => '21', 2 => '1982', )array ( 0 => 5, 1 => 21, 2 => 1982, )array ( 0 => '05', 1 => '21', 2 => '1982', )

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