Re: AW: AW: [PHP] PHP is Zero

2013-06-15 Thread Tamara Temple
BUSCHKE Daniel wrote: > 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

Re: AW: [PHP] PHP is Zero

2013-06-13 Thread Matijn Woudt
On Thu, Jun 13, 2013 at 1:49 PM, BUSCHKE Daniel < daniel.busc...@nextiraone.eu> 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 id

Re: [PHP] PHP is Zero

2013-06-13 Thread Samuel Lopes Grigolato
Just found out that MySQL uses the same implicit conversion precedence on SQL clauses. That shows me that possibly exists some "higher order" rule that states this consistency, and changing that is outside the scope of PHP. On Thu, Jun 13, 2013 at 9:20 AM, Stuart Dallas wrote: > On 13 Jun 2013,

Re: [PHP] PHP is Zero

2013-06-13 Thread Stuart Dallas
On 13 Jun 2013, at 12:27, BUSCHKE Daniel wrote: > 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

Re: AW: [PHP] PHP is Zero

2013-06-13 Thread Samuel Lopes Grigolato
version 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'; p

AW: AW: [PHP] PHP is Zero

2013-06-13 Thread BUSCHKE Daniel
be still 0. Regards Daniel -Ursprüngliche Nachricht- Von: BUSCHKE Daniel Gesendet: Donnerstag, 13. Juni 2013 13:28 An: 'Pete Ford'; php-general@lists.php.net Betreff: AW: AW: [PHP] PHP is Zero Hi, > It gives up when it finds a non-numeric character (as the documentation wou

AW: AW: [PHP] PHP is Zero

2013-06-13 Thread BUSCHKE Daniel
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

Re: AW: [PHP] PHP is Zero

2013-06-13 Thread Pete Ford
On 13/06/13 10:44, BUSCHKE Daniel wrote: Hi, thanks for your answer. Especially the answer "42" made me laughing :) My "Why" questions should be understand as "Why must it be like that" questions. On 13/06/13 08:59, BUSCHKE Daniel wrote: 5. Thats a bug I have opend: https://bugs.php.net/bug.ph

Re: AW: [PHP] PHP is Zero

2013-06-13 Thread richard gray
On 13/06/2013 11:44, BUSCHKE Daniel wrote: Hi, thanks for your answer. Especially the answer "42" made me laughing :) My "Why" questions should be understand as "Why must it be like that" questions. On 13/06/13 08:59, BUSCHKE Daniel wrote: 5. Thats a bug I have opend: https://bugs.php.net/bug

AW: [PHP] PHP is Zero

2013-06-13 Thread BUSCHKE Daniel
Hi, thanks for your answer. Especially the answer "42" made me laughing :) My "Why" questions should be understand as "Why must it be like that" questions. >> On 13/06/13 08:59, BUSCHKE Daniel wrote: >> 5. Thats a bug I have opend: https://bugs.php.net/bug.php?id=51739 where I >> also had the sa

Re: [PHP] PHP is Zero

2013-06-13 Thread Pete Ford
On 13/06/13 08:59, BUSCHKE Daniel wrote: Hi all, I want to start a discussion about a PHP behaviour that drives me crazy for years. For the beginning I would like you to guess what the result of the following snippet will be: var_dump('PHP' == 0); I know the difference of == and === but the r

AW: [PHP] PHP is Zero

2013-06-13 Thread BUSCHKE Daniel
== 1);' bool(false) regards Daniel -Ursprüngliche Nachricht- Von: georg [mailto:georg.chamb...@telia.com] Gesendet: Donnerstag, 13. Juni 2013 10:35 An: BUSCHKE Daniel Cc: php-general@lists.php.net Betreff: Re: [PHP] PHP is Zero Sorry missed to post list as well > Hi Daniel, > here is wi

Re: [PHP] PHP is Zero

2013-06-13 Thread georg
une 13, 2013 9:59 AM Subject: [PHP] PHP is Zero Hi all, I want to start a discussion about a PHP behaviour that drives me crazy for years. For the beginning I would like you to guess what the result of the following snippet will be: var_dump('PHP' == 0); I know the difference of

[PHP] PHP is Zero

2013-06-13 Thread BUSCHKE Daniel
Hi all, I want to start a discussion about a PHP behaviour that drives me crazy for years. For the beginning I would like you to guess what the result of the following snippet will be: var_dump('PHP' == 0); I know the difference of == and === but the result was unexcpected for me. And I hope