Re: Re: Clarification on the Enum language structure
| From: | Stas Malyshev | Date: | Wed, 23 Feb 2011 21:31:17 +0000 |
| Subject: | Re: Re: Clarification on the Enum language structure | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-51522@lists.php.net to get a copy of this message | ||
Hi!
You'd rather correct it to the closest value in the Enum, just like casting typehints? ;-)I'd rather not do it. Like, if you method can handle only a subset of integer type, handle it in the method and handle it in a meaningful, specific way. PHP is not really built for static type control. If you want that, you have plenty of compiled languages around. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227