3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $results = array ( 'day' => 9, 'hour' => 19, 'month' => 10, 'minute' => 5, 'meridiem' => NULL, 'second' => 40, 'year' => 2014, ); date_default_timezone_set('America/New_York'); $time = mktime( $results['hour'], $results['minute'], $results['second'], $results['month'], $results['day'], $results['year'] ); var_dump($time); $time = 1413569937; $d = date('d.m.Y H:i:s',$time); var_dump($d); date_default_timezone_set('Europe/Oslo'); $d = date('d.m.Y H:i:s',$time); var_dump($d);
based on 442I3
Output for 5.1.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
int(1412895940) string(19) "17.10.2014 14:18:57" string(19) "17.10.2014 20:18:57"
Output for 5.0.0 - 5.0.5
Fatal error: Call to undefined function date_default_timezone_set() in /in/Fed1g on line 11
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/Fed1g on line 11
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/Fed1g on line 11
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/Fed1g on line 11