|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7539 switch statement only process first 7 cases and default
Submitted: 2000-10-30 19:01 UTC Modified: 2000-10-30 19:10 UTC
From: razno at siteop dot org Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 4.0.3pl1 OS: Redhat 7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
28 + 28 = ?
Subscribe to this entry?

 [2000-10-30 19:01 UTC] razno at siteop dot org
switch ($rubrika) {
 case 01: $rubrika = "showbiz"; break;
 case 02: $rubrika = "politika"; break;
 case 03: $rubrika = "sport"; break;
 case 04: $rubrika = "avto"; break;
 case 05: $rubrika = "zabava"; break;
 case 06: $rubrika = "ljubezen"; break;
 case 07: $rubrika = "zdravje"; break;
 case 08: $rubrika = "znanost"; break;
 case 09: $rubrika = "racunalnistvo"; break;
 default: $rubrika = "racunalnistvo";
./configure --with-apache=../apache_1.3.12 --enable-track-vars --with-mysql --with-gdlib  --with-imap=/test/imap-4.7b/c-client


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-10-30 19:10 UTC]
This is not a bug in PHP--you're using octal numbers, (an integer
prefixed with a 0 is octal in PHP). Since octal digits only go up to 07,
you're hitting the ceiling there.

Remove the 0's from the beginnings of the numbers and it should
work as you expect.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu May 26 08:03:48 2022 UTC