3v4l.org

run code in 300+ PHP versions simultaneously
<?php $timestamp = "2016-10-07 01:31:42"; $date = date_create($timestamp, timezone_open('Asia/Kolkata')); echo date_format($date, 'Y-m-d H:i:sP') . "\n"; // or $triggerOn = '04/01/2013 03:08 PM'; $user_tz = 'Asia/Kolkata'; echo $timestamp. "\n"; // echoes 04/01/2013 03:08 PM $schedule_date = new DateTime($timestamp, new DateTimeZone($user_tz) ); $schedule_date->setTimeZone(new DateTimeZone('UTC')); $triggerOn = $schedule_date->format('Y-m-d H:i:s'); echo $triggerOn; // echoes 2013-04-01 22:08:00
Output for git.master, git.master_jit, rfc.property-hooks
2016-10-07 01:31:42+05:30 2016-10-07 01:31:42 2016-10-06 20:01:42

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