php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6047 pre-defined parameters not set
Submitted: 2000-08-09 08:15 UTC Modified: 2000-08-09 21:38 UTC
From: jake dot b at ision dot net dot uk Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 3.0.16 OS: Linux (debian)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jake dot b at ision dot net dot uk
New email:
PHP Version: OS:

 

 [2000-08-09 08:15 UTC] jake dot b at ision dot net dot uk
If you pass a variable that does not exist to a function, it does not use the default values, and infact does not create the variable at all. Its hard to tell if this is a bug or a feature, either way its very annoying.

Example:

function test($value=10)
{
  print isset($value);
}

test($non_existent_variable);

Output:
0

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-09 21:37 UTC] hholzgra@php.net
well, you pass an unset variable to your
function and isset() inside your function
tells you so, what is the problem?

obviously a feature, and ok IMHO, if you
really do not like it you might re-issue
it as a feature request
 [2000-08-09 21:38 UTC] hholzgra@php.net
closed
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Jan 18 08:01:23 2020 UTC