3v4l.org

run code in 300+ PHP versions simultaneously
<?php // set the default timezone to use. Available since PHP 5.1 date_default_timezone_set('Etc/GMT+5'); // Prints something like: Monday echo date("l"); // Prints something like: Monday 8th of August 2005 03:12:46 PM echo date('l jS \of F Y h:i:s A'); /* use the constants in the format parameter */ // prints something like: Wed, 25 Sep 2013 15:28:57 -0700 echo date(DATE_RFC2822); // prints something like: 2000-07-01T00:00:00+00:00 echo date(DATE_ATOM, mktime(0, 0, 0, 7, 1, 2000)); ?>
Output for 5.1.3 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
ThursdayThursday 2nd of April 2015 03:09:37 AMThu, 02 Apr 2015 03:09:37 -05002000-07-01T00:00:00-05:00
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 ThursdayThursday 2nd of April 2015 03:09:37 AMThu, 02 Apr 2015 03:09:37 -05002000-07-01T00:00:00-05:00
Output for 5.1.1 - 5.1.2
ThursdayThursday 2nd of April 2015 03:09:37 AMThu, 02 Apr 2015 03:09:37 -05002000-07-01T00:00:00-0500
Output for 5.1.0
ThursdayThursday 2nd of April 2015 03:09:37 AM Notice: Use of undefined constant DATE_RFC2822 - assumed 'DATE_RFC2822' in /in/D09L0 on line 14 ThuAMGMT+5E_RAprilC2822 Notice: Use of undefined constant DATE_ATOM - assumed 'DATE_ATOM' in /in/D09L0 on line 17 SatAMGMT+5E_AMGMT+5-0500Jul
Output for 5.0.0 - 5.0.5
Fatal error: Call to undefined function date_default_timezone_set() in /in/D09L0 on line 3
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/D09L0 on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
Fatal error: Call to undefined function: date_default_timezone_set() in /in/D09L0 on line 3
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/D09L0 on line 3

preferences:
249.64 ms | 401 KiB | 354 Q