php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20548 Decrement ("$x[$y]--") doesn't work on uninitiated variable
Submitted: 2002-11-21 12:42 UTC Modified: 2003-09-27 20:01 UTC
Votes:11
Avg. Score:4.4 ± 1.2
Reproduced:10 of 10 (100.0%)
Same Version:4 (40.0%)
Same OS:5 (50.0%)
From: prgallier at yahoo dot com Assigned:
Status: Wont fix Package: Scripting Engine problem
PHP Version: 4.3.2-dev OS: Linux 2.4
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: prgallier at yahoo dot com
New email:
PHP Version: OS:

 

 [2002-11-21 12:42 UTC] prgallier at yahoo dot com
The following:
  $score[$num]--;
does not affect $score[$num] if $score[$num] is uninitiated.
Using $score[$num]++ does work, however.
This is inconsistent.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-08-03 12:57 UTC] iliaa@php.net
This is a valid bug, however a fix would be a BC break that would result in a beahviour change that was in place since 3.0 days.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 03:01:28 2024 UTC