3v4l.org

run code in 300+ PHP versions simultaneously
<?php $currentDate = new \DateTime; echo 'Current Time: ' . $currentDate->format('h:i a') . PHP_EOL; $sd = "20th Dec, 2016"; $dt = DateTime::createFromFormat("dS M, Y", $sd); $strtotime = strtotime($dt->format("d-M-Y")); $dt2 = DateTime::createFromFormat("!dS M, Y", $sd); echo 'general' . \PHP_EOL; echo "\t" . $dt->format('Y-m-d h:i a') . \PHP_EOL; echo "\t" . $dt->getTimestamp() . \PHP_EOL; echo 'with !' . \PHP_EOL; echo "\t" . $dt2->format('Y-m-d h:i a') . \PHP_EOL; echo "\t" .$dt2->getTimestamp() . \PHP_EOL; echo 'strtotime' . \PHP_EOL; echo "\t" . date('Y-m-d h:i a', $strtotime) . PHP_EOL; echo "\t" . $strtotime . PHP_EOL;
Output for git.master, git.master_jit, rfc.property-hooks
Current Time: 04:46 pm general 2016-12-20 04:46 pm 1482248801 with ! 2016-12-20 12:00 am 1482188400 strtotime 2016-12-20 12:00 am 1482188400

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