3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function getStartTimeUTC(){ date_default_timezone_set('UTC'); $st = 20140828100000; //echo "{".intval(substr($st,4,2)),"-",intval(substr($st,6,2)),"-",substr($st,0,4)."}"; $resultTime = mktime(intval(substr($st,8,2)),intval(substr($st,10,2)),intval(substr($st,12,2)),intval(substr($st,4,2)),intval(substr($st,6,2)),substr($st,0,4)); return $resultTime; } echo getStartTimeUTC();
based on lhqUg
Output for 5.1.0 - 7.1.0
1409220000
Output for 5.0.0 - 5.0.5
Fatal error: Call to undefined function date_default_timezone_set() in /in/P4lZh on line 4
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: date_default_timezone_set() in /in/P4lZh on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: date_default_timezone_set() in /in/P4lZh on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: date_default_timezone_set() in /in/P4lZh on line 4