Re: [RFC] Safe Casting Functions
| From: | Stas Malyshev | Date: | Wed, 22 Oct 2014 08:51:31 +0000 |
| Subject: | Re: [RFC] Safe Casting Functions | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-78224@lists.php.net to get a copy of this message | ||
Hi!
> Thinking a bit more on this, if we don't want the 2/3 hurdle and perhaps
> make this a bit (or actually a lot) less controversial, we should change the
> names of these functions. to_float() strongly implies that this function
> represents PHP's standard typing ruleset, which these functions do not.
If it's done as part of filter or maybe even some aliases, like
filter_float for example (I still not completely getting why one needs
them, but assuming it's just my problem), then it can be considered
filter part, under the condition that these rules are not set in the
engine as "the rules" for treating the types - otherwise it's still be
language change.
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/