Doc #65762 [Opn]: Example citing use of constant is slightly inaccurate
Edit report at https://bugs.php.net/bug.php?id=65762&edit=1
ID: 65762
User updated by: ben at indietorrent dot org
Reported by: ben at indietorrent dot org
Summary: Example citing use of constant is slightly
inaccurate
Status: Open
Type: Documentation Problem
Package: Documentation problem
Operating System: Windows
PHP Version: 5.4.20
Block user comment: N
Private report: N
New Comment:
Not to nitpick, but the example is incorrect in another way: it
demonstrates the use of DATE_RFC822, but the sample output is actually from
DATE_RFC2822. The former includes a two-digit years, whereas the latter includes a
four-digit year.
Previous Comments:
------------------------------------------------------------------------
[2013-09-25 22:07:33] ben at indietorrent dot org
Description:
------------
---
From manual page: http://www.php.net/function.date
---
The example that demonstrates the use of a constant appears to be inaccurate:
<?php
/* use the constants in the format parameter */
// prints something like: Mon, 15 Aug 2005 15:12:46 UTC
echo date(DATE_RFC822);
?>
This actually prints something like the following:
Wed, 25 Sep 13 17:56:44 -0400
(notice that the last segment is the timezone *offset*, not the timezone
abbreviation, as the comment in the example states).
However, the manual entry is correct (only the example is incorrect).
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=65762&edit=1
Thread (3 messages)