Doc #53674 [Bgs]: Example 1 does not work, contradicts Description
| From: | thomas dot edwards at gmail dot com | Date: | Thu, 06 Jan 2011 16:58:08 +0000 |
| Subject: | Doc #53674 [Bgs]: Example 1 does not work, contradicts Description | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-5761@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=53674&edit=1
ID: 53674
User updated by: thomas dot edwards at gmail dot com
Reported by: thomas dot edwards at gmail dot com
Summary: Example 1 does not work, contradicts Description
Status: Bogus
Type: Documentation Problem
Package: Calendar related
Operating System: Mac OS X
PHP Version: 5.3.5
Block user comment: N
Private report: N
New Comment:
In the description it says that the first variable ($calendar) is an
integer, but
in Example 1 itâs clearly a string. And when you run the code, neither
a string or
integer seems to work.
Previous Comments:
------------------------------------------------------------------------
[2011-01-06 17:32:10] danbrown@php.net
Since when is 31 not an integer?
------------------------------------------------------------------------
[2011-01-06 17:27:22] thomas dot edwards at gmail dot com
Description:
------------
---
From manual page:
http://www.php.net/function.cal-days-in-month#Examples
---
Description:
int cal_days_in_month ( int $calendar , int $month , int $year )
Example 1:
<?php
$num = cal_days_in_month(CAL_GREGORIAN, 8, 2003); // 31
echo "There was $num days in August 2003";
?>
Clearly not a integer! Does not work!
Test script:
---------------
$num = cal_days_in_month(CAL_GREGORIAN, 8, 2003); // 31
echo "There was $num days in August 2003";
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53674&edit=1