RE: [PHP] default and another constructor
| From: | Ford, Mike [LSS] | Date: | Wed, 12 May 2004 14:37:24 +0000 |
| Subject: | RE: [PHP] default and another constructor | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-186008@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Rudy Metzger [mailto:rudy.metzger@pareto.nl]
> Sent: 12 May 2004 14:27
>
> On Wed, 2004-05-12 at 15:18, Mark Constable wrote:
> >
> > 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.
Not if the default is NULL -- isset(NULL) is false.
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds
Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@leedsmet.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211