php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11820 Error in parsing switch...
Submitted: 2001-07-01 04:42 UTC Modified: 2001-07-01 07:00 UTC
From: key at mail dot ru Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 4.0.5 OS: WIN98
Private report: No CVE-ID: None
 [2001-07-01 04:42 UTC] key at mail dot ru
switch (0)
{
case 01: echo "1Shit";
          break;
case 02: echo "2Shit";
          break;
case 03: echo "3Shit";
          break;
case 04: echo "4Shit";
          break;
case 05: echo "5Shit";
          break;
case 06: echo "6Shit";
          break;
case 07: echo "7Shit";
          break;
case 08: echo "8Shit";
          break;
case 09: echo "9Shit";
          break;
case 10: echo "8Shit";
          break;
}

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-01 07:00 UTC] derick@php.net
Not a bug, if you use a 0 before a number, it is treated like an octal number.
08 and 09 are not valid in the octal system. Just use 8 and 9 and it will work fine.

Derick
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue May 17 15:03:34 2022 UTC