php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23556 <0 default value become 0
Submitted: 2003-05-08 23:09 UTC Modified: 2003-05-09 02:18 UTC
From: Xuefer at 21cn dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.3.2RC2 OS: win
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: Xuefer at 21cn dot com
New email:
PHP Version: OS:

 

 [2003-05-08 23:09 UTC] Xuefer at 21cn dot com
function a($a = -1) {
	var_dump($a);
}
a();

result: int(0)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-05-09 01:57 UTC] philip@php.net
In linux I get the expected -1. 
 [2003-05-09 02:18 UTC] rioter@php.net
http://bugs.php.net/bug.php?id=23522

it is probably related to this bug as wez said its fixed in the cvs so try a snapshot from http://snaps.php.net if it however is not fixed re open it with the info provided when you submited the bug
 
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Oct 06 11:00:02 2026 UTC