Re: Re: Clarification on the Enum language structure
| From: | Stas Malyshev | Date: | Wed, 23 Feb 2011 08:35:30 +0000 |
| Subject: | Re: Re: Clarification on the Enum language structure | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-51506@lists.php.net to get a copy of this message | ||
Hi!
So before calling this method you better check it's argument against all possible enum values, otherwise it's fatal error, right? Doesn't seem as very helpful interface to me. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227IMHO, it should fail (unless 5 is the value explicitly mentioned in MyEnum definition)public function Killjoy(MyEnum $x)What would be the purpose of such code? What would it do if 5 is passed as $x?