3v4l.org

run code in 300+ PHP versions simultaneously
<?php $d1 = new DateTime('12/10/2012 05:33'); $d2 = new DateTime('12/10/2012'); $d3 = new DateTime('12/10/2012 00:00'); $d4 = new DateTime('12/10/2012 00:00:00'); function isMidnight(DateTime $dt): bool { return !trim($dt->format('Hisu'), '0'); } var_dump(isMidnight($d1), isMidnight($d2), isMidnight($d3), isMidnight($d4));
Output for git.master, git.master_jit, rfc.property-hooks
bool(false) bool(true) bool(true) bool(true)

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