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
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: 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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 02 07:01:33 2025 UTC