3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $onMay31 = DateTime::createFromFormat("F Y", "June 2017"); $bangDate = DateTime::createFromFormat("!F Y", "June 2017"); $pipeDate = DateTime::createFromFormat("F Y|", "June 2017"); printf("Regular date: %s\nBang date: %s\nPipe date: %s", $onMay31->format("M j, Y"), $bangDate->format("M j, Y"), $pipeDate->format("M j, Y"));
based on l6Nv2
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.1.7
Regular date: Jun 1, 2017 Bang date: Jun 1, 2017 Pipe date: Jun 1, 2017