Doc #53674 [Bgs]: Example 1 does not work, contradicts Description

From: Date: Thu, 06 Jan 2011 17:02:46 +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-5763@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: Just tested on a different server running 5.2.8, it accepts a string or an integer! So the code does work, although can’t seem to get it to work on my 5.3.5 server, but the Example does not follow the Description. Previous Comments: ------------------------------------------------------------------------ [2011-01-06 17:58:08] thomas dot edwards at gmail dot com 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. ------------------------------------------------------------------------ [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

« previous php.doc.bugs (#5763) next »