ID: 15010
Updated by: alexwaugh
Old Summary: switch() problem: "+" matches "-"
Reported By: [EMAIL PROTECTED]
Status: Closed
Bug Type: Variables related
Operating System: RISC OS
PHP Version: 4.1.0
Assigned To: alexwaugh
New Comment:

I could add a configure test for it, but PHP is linked statically to
the C library, and it is not (yet) trivial to compile PHP for RISC OS,
so at the moment virtually everyone uses the precompiled binaries I put
on my website.
There were also some fairly major bugs in the C library that were fixed
recently, and so using an uptodate version is important.
I think perhaps that the configure check could abort the configure
script with an error if it detects an old version, and force the user
to upgrade their C library, rather than providing a replacement
function.


Previous Comments:
------------------------------------------------------------------------

[2002-01-23 05:23:17] [EMAIL PROTECTED]

shall we add a configure test for it?

------------------------------------------------------------------------

[2002-01-23 05:05:04] [EMAIL PROTECTED]

Caused by a bug in strtol(). A fix has been sent to the RISC OS C
library maintainer.

------------------------------------------------------------------------

[2002-01-12 19:28:30] [EMAIL PROTECTED]

Oh, I just assumed it was a problem with PHP, but if it
doesn't happen on anything else, obviously not. :) I'll
get in touch with the RISC OS porter.


------------------------------------------------------------------------

[2002-01-12 18:29:33] [EMAIL PROTECTED]

Ok, sorry. I misread your report a bit ;)

So this applies only to RISC OS ? Can't reproduce this under linux.

------------------------------------------------------------------------

[2002-01-12 18:27:01] [EMAIL PROTECTED]

Jesus man.

case statements not followed by a break; statement fall through.

Your code should read:

<? $k = "+";
   switch($k) {
     case "-": print "Oh no!"; break;
     case "+": print "Correct!"; break;
   }
?>

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/?id=15010


Edit this bug report at http://bugs.php.net/?id=15010&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to