Re: Type hinting
| From: | Stas Malyshev | Date: | Thu, 27 May 2010 14:27:46 +0000 |
| Subject: | Re: Type hinting | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-48519@lists.php.net to get a copy of this message | ||
Hi!
It's exactly correct. Function declarations are a contract, just like interface specifications. Not a "let's pass some random stuff past customs to see if it works". Having this, in combination with theYes, it's exactly how PHP functions and operators always worked - "let's accept everything we can possibly accept", not "let's make pretend we don't know what string '1' is because type bit is wrong". -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227