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
 [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-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 13:01:28 2024 UTC