3v4l.org

run code in 300+ PHP versions simultaneously
<?php $firstDay = (new DateTime())->format('Y-' . 7 . '-' . 27); $secondDay = (new DateTime())->format('Y-' . 12 . '-' . 27); var_dump($firstDay); var_dump($secondDay); var_dump($firstDay > $secondDay); echo "\n------------------------------------------------------------------------------------\n\n"; $firstDay = (new DateTime())->format('Y-' . str_pad(7, 2, 0, STR_PAD_LEFT) . '-' . 27); $secondDay = (new DateTime())->format('Y-' . 12 . '-' . 27); var_dump($firstDay); var_dump($secondDay); var_dump($firstDay > $secondDay);
Output for git.master, git.master_jit, rfc.property-hooks
string(9) "2019-7-27" string(10) "2019-12-27" bool(true) ------------------------------------------------------------------------------------ string(10) "2019-07-27" string(10) "2019-12-27" bool(false)

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:
33.45 ms | 405 KiB | 9 Q