On Wed, 12 May 2004 11:27 pm, Rudy Metzger wrote:
> On Wed, 2004-05-12 at 15:18, Mark Constable wrote:
> > You can at least make the below work by removing the first
> > forum() instance and using
> >
> > function forum($naam=NULL,$tijd=NULL,$tekst=NULL)
> >
> > and test the incoming variables with isset() before attempting
> > to use any of them.
>
> If you assign default values to the method arguments, you cannot test
> them with isset() anymore, as they will be set.
# cat null_test.php
<?php
class forum {
function forum($naam=NULL,$tijd=NULL,$tekst=NULL) {
var_export($naam);
echo "\n";
var_export($tijd);
echo "\n";
var_export($tekst);
echo "\n";
}
}
$test=new forum('hi');
?>
# php null_test.php
'hi'
NULL
NULL
--markc
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php