On 24 June 2005 15:03, Jason Barnett wrote:
> Robert Cummings wrote:
> ...
> >
> >
> > There's a difference between a reference to a reference and a copy
> > of a reference *hehehe*.
> >
> > Cheers,
> > Rob.
>
> Dear diary: jackpot!
>
> Now that makes sense. And am I correctly filling in th
On 24/06/05, Jason Barnett <[EMAIL PROTECTED]> wrote:
> OK I'm pretty clear on it, but now I wonder: is variable assignment (=)
> the only place where the Zend Engine will copy a reference instead of
> reference the reference?
In PHP 4, function arguments work the same way. Unless you use the
ref
Robert Cummings wrote:
...
This is intentional behaviour, there are times when you want a copy of a
reference and there are times when you want a reference to a reference.
For instance consider the following:
$foo1 = $foo2 = $foo3 = new a();
$foo2 = new b();
If these were references to referen
On Fri, 2005-06-24 at 14:09, Jason Barnett wrote:
> Robert Cummings wrote:
> ...
> >
> > Yeah, *grin*. And on that note, there are times when you will actually
> > want $foo = &new SomeClass(); versus $foo = new SomeClass(); since
> > assigning by reference will break any previous references -- so
Robert Cummings wrote:
...
Yeah, *grin*. And on that note, there are times when you will actually
want $foo = &new SomeClass(); versus $foo = new SomeClass(); since
assigning by reference will break any previous references -- something I
forgot to mention to Matthew Weier when he challenged the
* Robert Cummings <[EMAIL PROTECTED]> :
> On Fri, 2005-06-24 at 10:02, Jason Barnett wrote:
> > Robert Cummings wrote:
> > ...
> > > There's a difference between a reference to a reference and a copy of a
> > > reference *hehehe*.
> >
> > Now that makes sense. And am I correctly filling in the bl
On Fri, 2005-06-24 at 10:02, Jason Barnett wrote:
> Robert Cummings wrote:
> ...
> >
> >
> > There's a difference between a reference to a reference and a copy of a
> > reference *hehehe*.
> >
> > Cheers,
> > Rob.
>
> Dear diary: jackpot!
>
> Now that makes sense. And am I correctly filling i
Robert Cummings wrote:
...
There's a difference between a reference to a reference and a copy of a
reference *hehehe*.
Cheers,
Rob.
Dear diary: jackpot!
Now that makes sense. And am I correctly filling in the blanks when I
guess that $foo3 = $aObj is merely copying the reference instead o
gt;
Cc: "PHP-General"
Sent: Thursday, June 23, 2005 11:50 PM
Subject: Re: [PHP] Re: Strange notation to create object
On Thu, 2005-06-23 at 15:28, Matthew Weier O'Phinney wrote:
* Robert Cummings <[EMAIL PROTECTED]> :
> On Thu, 2005-06-23 at 13:36, Matthew Weier O'P
Robert Cummings wrote:
On Thu, 2005-06-23 at 13:36, Matthew Weier O'Phinney wrote:
* Robert Cummings <[EMAIL PROTECTED]> :
On Thu, 2005-06-23 at 11:32, Matthew Weier O'Phinney wrote:
The above notation is unnecessary when developing in PHP5, as objects in
PHP5 are passed by ref
On Thu, 2005-06-23 at 21:44, Matthew Weier O'Phinney wrote:
> * Jason Barnett <[EMAIL PROTECTED]> :
> > Matthew Weier O'Phinney wrote:
> > ...
> > > This doesn't demonstrate what the OP was talking about, which is initial
> > > assignment of an object using a reference operator. The results of this
* Jason Barnett <[EMAIL PROTECTED]> :
> Matthew Weier O'Phinney wrote:
> ...
> > This doesn't demonstrate what the OP was talking about, which is initial
> > assignment of an object using a reference operator. The results of this
> > make perfect sense to me -- the references are passed exactly as
* Robert Cummings <[EMAIL PROTECTED]> :
> On Thu, 2005-06-23 at 15:28, Matthew Weier O'Phinney wrote:
> > * Robert Cummings <[EMAIL PROTECTED]> :
> > > On Thu, 2005-06-23 at 13:36, Matthew Weier O'Phinney wrote:
> > > > * Robert Cummings <[EMAIL PROTECTED]> :
> > > > > On Thu, 2005-06-23 at 11:32,
On Thu, 2005-06-23 at 15:28, Matthew Weier O'Phinney wrote:
> * Robert Cummings <[EMAIL PROTECTED]> :
> > On Thu, 2005-06-23 at 13:36, Matthew Weier O'Phinney wrote:
> > > * Robert Cummings <[EMAIL PROTECTED]> :
> > > > On Thu, 2005-06-23 at 11:32, Matthew Weier O'Phinney wrote:
> > > > > The above
Matthew Weier O'Phinney wrote:
...
This doesn't demonstrate what the OP was talking about, which is initial
assignment of an object using a reference operator. The results of this
make perfect sense to me -- the references are passed exactly as I would
expect.
But not exactly as I would expe
* Robert Cummings <[EMAIL PROTECTED]> :
> On Thu, 2005-06-23 at 13:36, Matthew Weier O'Phinney wrote:
> > * Robert Cummings <[EMAIL PROTECTED]> :
> > > On Thu, 2005-06-23 at 11:32, Matthew Weier O'Phinney wrote:
> > > > The above notation is unnecessary when developing in PHP5, as objects in
> > >
On Thu, 2005-06-23 at 13:36, Matthew Weier O'Phinney wrote:
> * Robert Cummings <[EMAIL PROTECTED]> :
> > On Thu, 2005-06-23 at 11:32, Matthew Weier O'Phinney wrote:
> > > The above notation is unnecessary when developing in PHP5, as objects in
> > > PHP5 are passed by reference by default. However
* Robert Cummings <[EMAIL PROTECTED]> :
> On Thu, 2005-06-23 at 11:32, Matthew Weier O'Phinney wrote:
> > * Michael Stepanov <[EMAIL PROTECTED]> :
> > > Usually, I develop on Perl. But my current task pushes me to start use
> > > PHP. Generally, it's great but sometimes I'm a little bit confused.
>
On Thu, 2005-06-23 at 11:32, Matthew Weier O'Phinney wrote:
> * Michael Stepanov <[EMAIL PROTECTED]>:
> > Usually, I develop on Perl. But my current task pushes me to start use
> > PHP. Generally, it's great but sometimes I'm a little bit confused.
> > For example, recently I've found a strange not
* Michael Stepanov <[EMAIL PROTECTED]>:
> Usually, I develop on Perl. But my current task pushes me to start use
> PHP. Generally, it's great but sometimes I'm a little bit confused.
> For example, recently I've found a strange notation of creation of PHP
> objects:
>
> $obj = & new SomeObject();
>
20 matches
Mail list logo