Re: type hinting
| From: | Stanislav Malyshev | Date: | Fri, 04 Jan 2008 18:54:05 +0000 |
| Subject: | Re: type hinting | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-34466@lists.php.net to get a copy of this message | ||
What's smaller, type checking with parameter type hinting, or manually using is_int, is_string, etc?Smaller from what POV? Developer-side, it's the same - one check there, one check here. Execution-side, since is_integer is a function and not operation, it's a tiny bit slower, but as I said, if you got to this level, you are looking for optimization in a wrong place. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com