#27097 [Opn]: checkdate asks for long doc says int
| From: | nlopess@php.net | Date: | Mon, 02 Feb 2004 16:04:23 +0000 |
| Subject: | #27097 [Opn]: checkdate asks for long doc says int | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969358694@lists.php.net to get a copy of this message | ||
ID: 27097
Updated by: nlopess@php.net
Reported By: trancer at trancer dot nl
Status: Open
Bug Type: Documentation problem
Operating System: Windows XP
PHP Version: 4.3.4
New Comment:
What should we do then?
Maybe its better to add a note to
http://php.net/manual/en/language.types.php
explaining that long is
similar to an integer.
Ideas?
Previous Comments:
------------------------------------------------------------------------
[2004-01-30 11:14:57] et@php.net
Derick: Then why does zend_zval_type_name return "integer"?
------------------------------------------------------------------------
[2004-01-30 11:13:31] et@php.net
When i think more about it, it doesn't really make sense for checkdate
to accept "1e1" (which is "numeric" but not an integer) but not "1d1",
so it is either too strict or not strict enough. Any thoughts?
------------------------------------------------------------------------
[2004-01-30 11:13:05] derick@php.net
No, the error message is correct. We use a long, internal type is long,
parse_parameters uses the "l" as type specifier... the docs needs
fixing.
------------------------------------------------------------------------
[2004-01-30 11:03:51] et@php.net
Note that "int" in php is a "signed long int"(32 bit), so int and long
are equivalent. But i think you shouldn't have to know C to read error
messages, so IMO the error message should change. I'll send a patch for
that to the list.
Additionally, checkdate() doesn't convert to int like other php
functions do, but since it's a validating function, that strictness is
desirable behaviour imo, but should be documented. I'll add a note to
the manual.
------------------------------------------------------------------------
[2004-01-30 10:48:55] didou@php.net
should the proto be number ?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/27097
--
Edit this bug report at http://bugs.php.net/?id=27097&edit=1