I agree with you that this is a confusing and error-prone behavior, but I also agree with Richard Gray, I wouldn't try to change this for the same reason that a "1+1=3" shouldn't be touched if it's "correct" on a huge amount of existing codebases... On Thu, Jun 13, 2013 at 8:49 AM, BUSCHKE Daniel < Daniel.BUSCHKE@xxxxxxxxxxxxx> wrote: > To be more technical: > > If intval('8315e839da08e2a7afe6dd12ec58245d') would return NULL instead of > 8315 then PHP would be still weak-typed and the developer could know that > the conversion failed. Good idea? Of course NULL should be transparent in > operations like +. So 0 + NULL should be still 0. > > Regards > Daniel > > -----Ursprüngliche Nachricht----- > Von: BUSCHKE Daniel > Gesendet: Donnerstag, 13. Juni 2013 13:28 > An: 'Pete Ford'; php-general@xxxxxxxxxxxxx > Betreff: AW: AW: PHP is Zero > > Hi, > > > It gives up when it finds a non-numeric character (as the documentation > would tell you) > > Why is PHP doing that? I know it works as designed and I know it is > documented like this but that does not mean that it is a good feature, does > it? So lets talk about the question: Is that behaviour awaited by PHP > software developers? Is that really the way PHP should work here? May we > should change that?! > > BTW: I talked to some collegues and friends since my first post. They all > guessed that "'PHP' == 0" is false within a few seconds. I think the > weak-typed-PHP is a little to weak at this point. > > Regards > Daniel > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >