> Am 02.06.2016 um 21:43 schrieb Fleshgrinder <p...@fleshgrinder.com>: > > On 6/2/2016 9:40 PM, Bob Weinand wrote: >> is_numeric() is returning a boolean (that's the condition). $str+0 does >> conditionally cast to int or float (whatever the string specifies). >> > > php -r 'var_dump("foo" + 0);' > int(0) > > This is what I am referring too. Shouldn't this crap result in an error? > > is_numeric($x) || throw TypeError('no no'); > > -- > Richard "Fleshgrinder" Fussenegger >
Oh, well… Better now? Bob -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php