Re: HTML_QuickForm::createElement(): static or not?
| From: | Bertrand Mansion | Date: | Fri, 23 May 2003 08:04:13 +0000 |
| Subject: | Re: HTML_QuickForm::createElement(): static or not? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-5563@lists.php.net to get a copy of this message | ||
<tech-php@sklar.com> wrote :
> If I have created a form with something like
>
> $form = new HTML_QuickForm('myform');
>
> Is there any difference if I create an element with
>
> $element =& HTML_QuickForm::createElement('text','name');
>
> or
>
> $element =& $form->createElement('text','name');
>
> ?
>
> Also, under PHP 5 is it OK to call createElement() without the =&? (Just
> $element = $form->createElement())
Hi David,
The recommended way to use createElement is the static way using ::
PHP5 won't need & to get a reference as it will be the default behavior.
How is it going with what you told me about in Amsterdam ?
Cheers,
Bertrand Mansion
Mamasam