3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo date_default_timezone_get(), PHP_EOL; echo PHP_EOL, 'time()', PHP_EOL; $timestamp = strtotime('15-01-2016'); echo date('H:i:sP', $timestamp); echo $timestamp, PHP_EOL; echo PHP_EOL, 'DateTime1', PHP_EOL; $dateTime = new DateTime('@' . $timestamp); echo $dateTime->getTimestamp(), PHP_EOL, $dateTime->format('H:i:sP'), PHP_EOL; echo PHP_EOL, 'DateTime2', PHP_EOL; $dateTime = new DateTime('@' . $timestamp); $dateTime->setTimezone(new DateTimeZone(date_default_timezone_get())); echo $dateTime->getTimestamp(), PHP_EOL, $dateTime->format('H:i:sP'), PHP_EOL;
Output for git.master, git.master_jit, rfc.property-hooks
Europe/Amsterdam time() 00:00:00+01:001452812400 DateTime1 1452812400 23:00:00+00:00 DateTime2 1452812400 00:00:00+01:00

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:
49.01 ms | 401 KiB | 8 Q