@ 2018-02-04T16:46:19Z <?php
$time_str = '1:47 PM';
$tz_str = 'America/New_York';
$timestamp = time();
$datetime = new DateTime("now", new DateTimeZone($tz_str)); //first argument "must" be a string
$datetime->setTimestamp($timestamp); //adjust the object to correct timestamp
//$datetime = new DateTime( '2010-05' );
$datetime->modify( 'first day of +0 month' );
echo $datetime->format( 'F' ), "\n";
echo $datetime->format('w d.m.Y, H:i:s') . "\n";
echo $datetime->format('m.Y') . "\n";
$datetime->modify( 'fourth thursday of +0 month' );
echo $datetime->format( 'F' ), "\n";
echo $datetime->format('w d.m.Y, H:i:s') . "\n";
echo $datetime->format('m.Y') . "\n";
$datetime->modify( 'first day of +1 month' );
echo $datetime->format( 'F' ), "\n";
echo $datetime->format('w d.m.Y, H:i:s') . "\n";
echo $datetime->format('m.Y') . "\n";
$datetime->modify('+1 day' );
echo $datetime->format( 'F' ), "\n";
echo $datetime->format('w d.m.Y, H:i:s') . "\n";
echo $datetime->format('m.Y') . "\n";
$datetime->modify('last day of previous month')->modify('+10 day');
echo $datetime->format( 'F' ), "\n";
echo $datetime->format('w d.m.Y, H:i:s') . "\n";
echo $datetime->format('m.Y') . "\n";
$datetime->format('2000-12-10');
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).
Version System time (s) User time (s) Memory (MiB) 7.2.6 0.004 0.011 17.34 7.2.2 0.039 0.013 17.95 7.2.1 0.024 0.016 18.21 7.2.0 0.024 0.017 18.23 7.1.20 0.008 0.004 15.71 7.1.14 0.031 0.008 16.79 7.1.13 0.026 0.018 16.59 7.1.12 0.031 0.009 16.82 7.1.11 0.027 0.010 15.88 7.1.10 0.029 0.003 16.07 7.1.9 0.026 0.007 16.36 7.1.8 0.037 0.012 16.41 7.1.7 0.027 0.008 15.45 7.1.6 0.038 0.010 33.48 7.1.5 0.039 0.008 33.08 7.1.4 0.036 0.011 32.84 7.1.3 0.044 0.011 32.93 7.1.2 0.062 0.007 32.86 7.1.1 0.022 0.013 15.19 7.1.0 0.022 0.007 15.20
preferences:dark mode live preview
27.8 ms | 401 KiB | 5 Q