From:             [EMAIL PROTECTED]
Operating system: win2k
PHP version:      4.0.5
PHP Bug Type:     Documentation problem
Bug description:  bad example

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


Edit Bug report at:

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to