Empty Reference to an Object
| From: | Sebastian Ossio | Date: | Tue, 13 Jan 2004 15:09:39 +0000 |
| Subject: | Empty Reference to an Object | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-174446@lists.php.net to get a copy of this message | ||
Hi,
I´m trying to give an empty reference as a parameter, in a function. Or rather make a parameter that is a reference optional.
I have a function that should react differently if it is given an object or not. It works, but it gives me a warning that the second argument is not being given obviously.
Sadly I cannot make the parameter optional in the function definition because mine has to be a reference. One can´t do such a thing as
function( $parameter1, & objectparameter = NULL)
this results into a parsing error.
I cannot believe that there is no way of making an object parameter optional.
So tell me please what I´m missing.