Re: [RFC] Strict type hints (parameter and return value)
| From: | Chris Stockton | Date: | Thu, 17 Apr 2008 17:23:44 +0000 |
| Subject: | Re: [RFC] Strict type hints (parameter and return value) | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-37094@lists.php.net to get a copy of this message | ||
On Thu, Apr 17, 2008 at 10:11 AM, Sam Barrow <sam@sambarrow.com> wrote:
> Actually, is_numeric checks for strings that contain numeric values,
> it's not the same as is_bool, is_int, is_float, etc, which check the
> variable's type.
Hence my second example = )
> Your point is very valid for is_int and similar functions, just not
> is_numeric(). I just did a grep on zend framework for is_int and there
> were tons of results.
>
I think it is valid for anything, numeric type hinting is very appropriate
in php.