3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * @link https://stackoverflow.com/a/13129856/367456 */ $formats = array( 'today midnight', 'midnight', 'today', 'TODAY', 'MidNight', 'ToDaY', 'tomorrow', 'UTC today', 'today Z', 'today Europe/Berlin', 'Asia/Shanghai today', 'Asia/Shanghai', 'HKST today', ); $time = strtotime('UTC 2020-01-01 00:00:00'); printf("UTC time is: %d (script-time, is UTC 2020-01-01 00:00:00)\n", $time); if (is_callable('date_default_timezone_get')) { printf("default time-zone is: %s\n", date_default_timezone_get()); } else { printf("default time-zone is: %s\n", '???'); } foreach ($formats as $format) { printf("%'.-24s: %s\n", "$format ", strtotime($format, $time)); }
Output for git.master, git.master_jit, rfc.property-hooks
UTC time is: 1577836800 (script-time, is UTC 2020-01-01 00:00:00) default time-zone is: Europe/Amsterdam today midnight .........: 1577833200 midnight ...............: 1577833200 today ..................: 1577833200 TODAY ..................: 1577833200 MidNight ...............: 1577833200 ToDaY ..................: 1577833200 tomorrow ...............: 1577919600 UTC today ..............: 1577836800 today Z ................: 1577836800 today Europe/Berlin ....: 1577833200 Asia/Shanghai today ....: 1577808000 Asia/Shanghai ..........: 1577811600 HKST today .............: 1577804400

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:
67.21 ms | 402 KiB | 8 Q