> -----Original Message----- > From: Rowan Collins [mailto:rowan.coll...@gmail.com] > Sent: Monday, July 14, 2014 7:44 PM > To: Zeev Suraski; Andrea Faulds > Cc: internals@lists.php.net > Subject: Re: [PHP-DEV] [RFC] Scalar Type Hinting With Casts (re-opening) > > Zeev Suraski wrote (on 14/07/2014): > > I do believe that the vast majority of people would want '32 ' and > > "42\n" > > to silently convert to 32/42, and will generally not care much about > > '32abc' converting to 32 either for the sake of consistency. > > And passing 'hello' to a function type hinted as int? Will people really > expect > that to become a 0, with a mild warning they may not even have enabled?
I'd say absolutely yes, if they're PHP developers that's exactly what they'd expect. After all, if you use 'hello' today in any integer context in PHP, explicit or implicit, that's exactly how it will behavior across the language. Zeev -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php