3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('date.timezone', 'GMT'); // Sun, 06 Nov 1994 08:49:37 GMT $date = gmmktime(8, 49, 37, 11, 6, 1994); function compare_date_format($date, $constant, $string) { $constant_date = date((defined($constant)) ? constant($constant) : '', $date); $string_date = date($string, $date); var_dump($constant, $constant_date, $string_date, $constant_date === $string_date); } compare_date_format($date, 'DATE_RFC822', 'D, j M y H:i:s O'); compare_date_format($date, 'DATE_RFC850', 'l, d-M-y H:i:s T'); compare_date_format($date, 'DATE_RFC1036', 'D, d M y H:i:s O'); compare_date_format($date, 'DATE_RFC1123', 'D, d M Y H:i:s O'); compare_date_format($date, 'DATE_RFC2109', 'D, d-M-y H:i:s T'); compare_date_format($date, 'DATE_COOKIE', 'D, d-M-Y H:i:s T'); compare_date_format($date, 'DATE_RFC2616', 'D, d M Y H:i:s \G\M\T'); //compare_date_format($date, 'DATE_RFC2965', ''); compare_date_format($date, 'DATE_RFC2822', 'D, j M Y H:i:s O'); compare_date_format($date, 'DATE_RFC5322', 'D, j M Y H:i:s O'); compare_date_format($date, 'DATE_RFC6265', 'D, d M Y H:i:s \G\M\T'); compare_date_format($date, 'DATE_RFC7231', 'D, d M Y H:i:s \G\M\T');
Output for git.master, git.master_jit, rfc.property-hooks
string(11) "DATE_RFC822" string(29) "Sun, 06 Nov 94 08:49:37 +0000" string(28) "Sun, 6 Nov 94 08:49:37 +0000" bool(false) string(11) "DATE_RFC850" string(30) "Sunday, 06-Nov-94 08:49:37 GMT" string(30) "Sunday, 06-Nov-94 08:49:37 GMT" bool(true) string(12) "DATE_RFC1036" string(29) "Sun, 06 Nov 94 08:49:37 +0000" string(29) "Sun, 06 Nov 94 08:49:37 +0000" bool(true) string(12) "DATE_RFC1123" string(31) "Sun, 06 Nov 1994 08:49:37 +0000" string(31) "Sun, 06 Nov 1994 08:49:37 +0000" bool(true) string(12) "DATE_RFC2109" string(0) "" string(27) "Sun, 06-Nov-94 08:49:37 GMT" bool(false) string(11) "DATE_COOKIE" string(32) "Sunday, 06-Nov-1994 08:49:37 GMT" string(29) "Sun, 06-Nov-1994 08:49:37 GMT" bool(false) string(12) "DATE_RFC2616" string(0) "" string(29) "Sun, 06 Nov 1994 08:49:37 GMT" bool(false) string(12) "DATE_RFC2822" string(31) "Sun, 06 Nov 1994 08:49:37 +0000" string(30) "Sun, 6 Nov 1994 08:49:37 +0000" bool(false) string(12) "DATE_RFC5322" string(0) "" string(30) "Sun, 6 Nov 1994 08:49:37 +0000" bool(false) string(12) "DATE_RFC6265" string(0) "" string(29) "Sun, 06 Nov 1994 08:49:37 GMT" bool(false) string(12) "DATE_RFC7231" string(29) "Sun, 06 Nov 1994 08:49:37 GMT" string(29) "Sun, 06 Nov 1994 08:49:37 GMT" bool(true)

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
136.38 ms | 409 KiB | 5 Q