3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date_object = new DateTime('2011-04-24'); echo "Today: ".date('Y-m-d').PHP_EOL. "Yesterday: ".date('Y-m-d', mktime(0, 0, 0, date("m"), date("d")-1, date("Y"))).PHP_EOL. "42 days ago: ".date('Y-m-d', mktime(0, 0, 0, date("m"), date("d")-42, date("Y"))).PHP_EOL. "OP's date: ".date('Y-m-d', mktime(0, 0, 0, $date_object->format("m"), $date_object->format("d")-1, $date_object->format("Y") ) );
Output for git.master_jit, git.master, rfc.property-hooks
Today: 2022-11-17 Yesterday: 2022-11-16 42 days ago: 2022-10-06 OP's date: 2011-04-23

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