3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // getting the serial number list($serial) = sscanf("SN/2350001", "SN/%d"); // and the date of manufacturing $mandate = "January 01 2000"; list($month, $day, $year) = sscanf($mandate, "%s %d %d"); echo "Item $serial was manufactured on: $year-" . substr($month, 0, 3) . "-$day\n"; ?>
Output for 4.3.0 - 7.2.0
Item 2350001 was manufactured on: 2000-Jan-1