3v4l.org

run code in 300+ PHP versions simultaneously
<?php //create datetime object with starting time in h:i a format $openSoon = new DateTime('8:00 am'); //subtract 15 minutes from time $openSoon->sub(new DateInterval('PT15M')); //This returns full date with current time - 15 minutes //My objective at this point is to get just the date portion out of the DateTime object which is the DateTime->date value echo $openSoon->format('Y-m-d H:i:s.u');
Output for git.master, git.master_jit, rfc.property-hooks
2018-08-21 07:45:00.000000

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