|
Posted by Ivαn Sαnchez Ortega on 03/07/07 01:29
Phil Latio wrote:
> Firstly, is the following code allowed assuming the addContent function
> expects as single argument?
> $page->addContent($form = new Form());
Yes.
> Secondly, I've been reading a tutorial and noticed the use of an "&" in
> front of the word "new" when instantiating a new object. See example
> below, I just wondered what is it's significance? The code was purely a
> snippet. $textField1 = &new inputTextObject("blah", "blah", "blah");
The ampersand sign ("&") is the reference operator; it has no use at all
when creating new instances.
--
----------------------------------
IvΓ‘n SΓ‘nchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-
Dios os ha dado una cara y vosotros os hacΓ©is otra.- Shakespeare.
Navigation:
[Reply to this message]
|