3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // Everything you enter here will be executed by our servers. Try it! echo strtotime("2013-07-09 02:58:53").','; $datetime = strtotime("2013-07-09 02:58:53"); echo date("Y-m-d H:i:s", $datetime).','; echo date("m/d/y",datetime);
Output for 7.3.0alpha1 - 7.3.0rc4
1373331533,2013-07-09 02:58:53, Warning: Use of undefined constant datetime - assumed 'datetime' (this will throw an Error in a future version of PHP) in /in/PR7rl on line 7 Warning: date() expects parameter 2 to be int, string given in /in/PR7rl on line 7
Output for 7.2.0 - 7.2.6
1373331533,2013-07-09 02:58:53, Warning: Use of undefined constant datetime - assumed 'datetime' (this will throw an Error in a future version of PHP) in /in/PR7rl on line 7 Warning: date() expects parameter 2 to be integer, string given in /in/PR7rl on line 7
Output for 7.0.0 - 7.1.20
1373331533,2013-07-09 02:58:53, Notice: Use of undefined constant datetime - assumed 'datetime' in /in/PR7rl on line 7 Warning: date() expects parameter 2 to be integer, string given in /in/PR7rl on line 7
Output for 5.1.0 - 5.6.28
1373331533,2013-07-09 02:58:53, Notice: Use of undefined constant datetime - assumed 'datetime' in /in/PR7rl on line 7 Warning: date() expects parameter 2 to be long, string given in /in/PR7rl on line 7
Output for 4.3.0 - 5.0.5
1373331533,2013-07-09 02:58:53, Notice: Use of undefined constant datetime - assumed 'datetime' in /in/PR7rl on line 7 01/01/70