Re: [PHP] Strange notation to create object

2005-06-24 Thread Michael

John Hinton wrote:

Michael Stepanov wrote:

With a return receipt attached

and I'm wondering if we all return the receipt each time someone forgets 
about this on various mailing lists, would the 6583 subscribers actually 
returned the receipt, would it break the habit?


All in fun... sorry Michael.. it just happened to be yours that finally 
convinced me to send this. I just get tired of the interruption of my 
delete process.


Sorry for that. It's my working email and sometimes it's useful to see 
did somebody read your email or not.


And many thanks, guys, for you explanation!



Best,
John Hinton




--
Best regards,
Michael Stepanov,
www.stepanoff.org

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Strange notation to create object

2005-06-23 Thread Rory Browne
It's in the manual.

PHP4
$obj = new SomeObject() would create a SomeObject, and assign it by
value to $obj. $obj would be a copy of the one created. by the new
SomeObject.  makes it assign by reference.

PHP5
In PHP5 Objects are assigned by reference anyway so the  doesn't matter.


On 6/23/05, Michael Stepanov [EMAIL PROTECTED] wrote:
 Dear all,
 
 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();
 
 Can anyone explain me meaning of **?
 
 Thanks in advanced
 
 --
 Best regards,
 Michael Stepanov
 Perl/Linux Developer
 Francoudi  Stephanou Ltd
 Tel: +357 25-867154
 Email: [EMAIL PROTECTED]
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Strange notation to create object

2005-06-23 Thread Rory Browne
Try this

?php

$a = 1;
$b = $a; 
$c = $a;

$a = 2;
printf(a=%d, b=%d, c=%d\n, $a, $b, $c);

$c = 3;
printf(a=%d, b=%d, c=%d\n, $a, $b, $c);

?

On 6/23/05, Michael Stepanov [EMAIL PROTECTED] wrote:
 Dear all,
 
 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();
 
 Can anyone explain me meaning of **?
 
 Thanks in advanced
 
 --
 Best regards,
 Michael Stepanov
 Perl/Linux Developer
 Francoudi  Stephanou Ltd
 Tel: +357 25-867154
 Email: [EMAIL PROTECTED]
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Strange notation to create object

2005-06-23 Thread Michael Stepanov

Rory Browne wrote:


It's in the manual.

PHP4
$obj = new SomeObject() would create a SomeObject, and assign it by
value to $obj. $obj would be a copy of the one created. by the new
SomeObject.  makes it assign by reference.

PHP5
In PHP5 Objects are assigned by reference anyway so the  doesn't matter.

 


Now I understand. Many thanks!


On 6/23/05, Michael Stepanov [EMAIL PROTECTED] wrote:
 


Dear all,

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();

Can anyone explain me meaning of **?

Thanks in advanced

--
Best regards,
Michael Stepanov
Perl/Linux Developer
Francoudi  Stephanou Ltd
Tel: +357 25-867154
Email: [EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


   




--
Best regards, 
Michael Stepanov

Perl/Linux Developer
Francoudi  Stephanou Ltd
Tel: +357 25-867154
Email: [EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Strange notation to create object

2005-06-23 Thread John Hinton

Michael Stepanov wrote:

With a return receipt attached

and I'm wondering if we all return the receipt each time someone forgets 
about this on various mailing lists, would the 6583 subscribers actually 
returned the receipt, would it break the habit?


All in fun... sorry Michael.. it just happened to be yours that finally 
convinced me to send this. I just get tired of the interruption of my 
delete process.


Best,
John Hinton

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Strange notation to create object

2005-06-23 Thread John Nichel

John Hinton wrote:

Michael Stepanov wrote:

With a return receipt attached

and I'm wondering if we all return the receipt each time someone forgets 
about this on various mailing lists, would the 6583 subscribers actually 
returned the receipt, would it break the habit?


All in fun... sorry Michael.. it just happened to be yours that finally 
convinced me to send this. I just get tired of the interruption of my 
delete process.


I don't even say anything about it anymore...just /dev/null when I see 
that return receipt box pop-up.


--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php