3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $results = array ( 'day' => 17, 'hour' => 15, 'month' => 10, 'minute' => 51, '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);
based on kCbqP
Output for 5.1.0 - 7.1.0
int(1413575500) string(19) "17.10.2014 15:51:40"
Output for 5.0.0 - 5.0.5
Fatal error: Call to undefined function date_default_timezone_set() in /in/0G2je 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/0G2je 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/0G2je 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/0G2je on line 11