Re: Bug #6047: pre-defined parameters not set

From: Date: Wed, 09 Aug 2000 12:26:39 +0000
Subject: Re: Bug #6047: pre-defined parameters not set
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-28247@lists.php.net to get a copy of this message
Hi, jake.b@ision.net.uk wrote: > From: jake.b@ision.net.uk > Operating system: Linux (debian) > PHP version: 3.0.16 > PHP Bug Type: Scripting Engine problem > Bug description: pre-defined parameters not set > > 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 > AFAIK is that if you do "test();" you'll get as output: 10. Because a non-existent variable exists as soon as you use it, I think this is very normal behaviour. I don't think the feature as you suggest can be added. > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net > For additional commands, e-mail: php-dev-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net -- Derick Rethans JDI Media Solutions H.v.Tussenbroekstraat 1 6952 BL Dieren The Netherlands e-mail: d.rethans@jdimedia.nl http://www.jdimedia.nl/

« previous php.dev (#28247) next »