|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #11762 bad example
Submitted: 2001-06-27 22:34 UTC Modified: 2001-06-30 03:29 UTC
From: Xuefer at 21cn dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: 4.0.5 OS: win2k
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: Xuefer at 21cn dot com
New email:
PHP Version: OS:


 [2001-06-27 22:34 UTC] Xuefer at 21cn dot com
PHP manual
(PHP 3, PHP 4 )

getdate -- Get date/time information

array getdate ([int timestamp])

Example 1. getdate() example 

$today = getdate(); 
$month = $today[month]; 
$mday = $today[mday]; 
$year = $today[year]; 
echo "$month $mday, $year";
-> $mday = $today[mday]; 
warnning: Use of undefined constant mday - assumed 'mday'
although a undefined constant will be assumed as a string, it's still a bad usage of this auto conversion.

php manual writers shouldn't make a bad guide for php learners



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-27 23:03 UTC]
You must be looking into old manual or something since
the example I see on the getdate() manual page has perfect,
working example in it.

 [2001-06-28 08:23 UTC] Xuefer at 21cn dot com
I think i've downloaded the lastest version of chm file.
I do also download it again.
isn't the CHM version of document the newest document ?
 [2001-06-28 11:29 UTC]
Not necessarily. Latest should always be the online manual.
And the VERY latest is in CVS. :)

 [2001-06-28 14:32 UTC] Xuefer at 21cn dot com
thx for replying, thx 
btw, in
doucument list
file size? may not need if file is small enough
file size for compare and decide whether to download ?
why not show an document last update date?
or document version will be better :P
just suggestion, may not post as a reply here
 [2001-06-28 17:21 UTC]
I believe that the PDF and CHM version of the module always lag behind due to the amount of work it takes to package them up.  If you are ever in doubt, please check the online html manual first.  You can visit it directly at:

 [2001-06-28 17:22 UTC]
My apologies.. I responded before I realized that the mailing lists are 12-14 hrs behind.  I didn't think to read the bug report on the page to make sure no one responded to it already.
 [2001-06-28 17:59 UTC]
I'm planning to update the CHM versions soon now, as lots of things have been changed.
I hope I can do it this weekend.

 [2001-06-29 12:36 UTC]
There will be some date info also on that page. I'll do it ASAP. It was on my todo list for a week now. Well, dates are much important, but sizes are also usable, when you need to choose from .zip or .tar.gz, while your zip program handles both of them.

It is true, that PDFs, CHMs and Palm docs are behind, but just because we have no **automated** process to do it. Everything else is automated (text and HTML). This is also on our __long time__ todo list to implement some automated CHM generation on Unix (it is not easy to do :).
 [2001-06-29 13:27 UTC]
OK, as you suggested dates are printed now. You can see, that nearly all files are autogenerated daily (dispite what I said before) except the CHM version (and the temp unavailable PDF). We will update the CHM versions soon.

Anyway, this way the full table listing is **UGLY**. Is there anybody with a better layout tip?

Ps. I used the RFC date type date('r", $changed) to be world wide compatible (though it is very long...).
 [2001-06-29 23:11 UTC] Xuefer at 21cn dot com
thank u all :))
 [2001-06-30 03:29 UTC]
Hi goba,

how about:

| Language  | Format          | Filename  | Size  | Date   |
|           | Single HTML     | html.gz   | 123kB | a date |
|           +-----------------+-----------+-------+--------+
|           | Plaintext       | txt.gz    | 456kB | a date |
|           +-----------------+-----------+-------+--------+
|           | Many HTML files | tar.gz    | 789kB | a date |
| English   |                 | .zip      | 1.2MB | a date |
|           +-----------------+-----------+-------+--------+
|           | PDF             | txt.gz    | 456kB | a date |
|           +-----------------+-----------+-------+--------+
|           | PalmPilot DOC   | doc.pdb   | 456kB | a date |
|           +-----------------+-----------+-------+--------+
|           | PalmPilot iSilo | isilo.pdb | 456kB | a date |
|           +-----------------+-----------+-------+--------+
|           | Windows HTMLHlp | chm       | 456kB | a date |

you get the idea.
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Thu Nov 26 13:01:23 2020 UTC