Re: [PHP-DOC] oop5 basic rewrite informal RFC

2009-09-09 Thread Hannes Magnusson
On Wed, Sep 9, 2009 at 17:59, Daniel Convissor wrote: > Hi Greg: > >> Copy-on-write still happens, the example you gave doesn't change a >> variable, only a property. > > Yeah. > > >> A better comparison would be between arrays and objects, as this >> demonstrates that they behave differently in PH

Re: [PHP-DOC] oop5 basic rewrite informal RFC

2009-09-09 Thread Daniel Convissor
Hi Greg: > Copy-on-write still happens, the example you gave doesn't change a > variable, only a property. Yeah. > A better comparison would be between arrays and objects, as this > demonstrates that they behave differently in PHP 5, but were the same in > PHP 4 > > $a = array('m' => 'foo');

Re: [PHP-DOC] oop5 basic rewrite informal RFC

2009-09-09 Thread Greg Beaver
Daniel Convissor wrote: > // Copy-on-write is not what happens when dealing only with objects: > class not_copy_on_write { > public $m = 'foo'; > } > $a = new not_copy_on_write; > $b = $a; > $a->m = 'bar'; > echo "\$a->m = $a->m, \$b->m = $b->m\n"; > > ?> Hi Dan, Copy-on-write still happens

Re: [PHP-DOC] oop5 basic rewrite informal RFC

2009-09-09 Thread Daniel Convissor
Hi Brandon: > http://blog.libssh2.org/index.php?/archives/51-Youre-being-lied-to..html Yeah, that's a good article. I've seen it on other occasions. But she's kind of "lying" too... m = $b->m\n"; // Copy-on-write is not what happens when dealing only with objects: class not_copy_on_write {

Re: [PHP-DOC] oop5 basic rewrite informal RFC

2009-09-09 Thread Daniel Convissor
On Tue, Sep 08, 2009 at 07:56:43PM -0700, Lars Torben Wilson wrote: > > Personally I like "property" I agree. That's what I, and most people, call them. It'd be good to have that be the term throughout the manual. Thanks, --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M

Re: [PHP-DOC] oop5 basic rewrite informal RFC

2009-09-09 Thread Brandon Savage
On Wed, Sep 9, 2009 at 9:35 AM, Brandon Savage wrote: > > > On Wed, Sep 9, 2009 at 9:31 AM, G. T. Stresen-Reuter < > tedmaster...@gmail.com> wrote: > >> >> On Sep 9, 2009, at 2:02 PM, Hannes Magnusson wrote: >> >> On Wed, Sep 9, 2009 at 13:20, Brandon Savage >>> wrote: >>> This documentation

Re: [PHP-DOC] oop5 basic rewrite informal RFC

2009-09-09 Thread Brandon Savage
On Wed, Sep 9, 2009 at 9:31 AM, G. T. Stresen-Reuter wrote: > > On Sep 9, 2009, at 2:02 PM, Hannes Magnusson wrote: > > On Wed, Sep 9, 2009 at 13:20, Brandon Savage >> wrote: >> >>> This documentation already exists in that section. >>> >>> I'll amend my diff to reference this section. Something

Re: [PHP-DOC] oop5 basic rewrite informal RFC

2009-09-09 Thread G. T. Stresen-Reuter
On Sep 9, 2009, at 2:02 PM, Hannes Magnusson wrote: On Wed, Sep 9, 2009 at 13:20, Brandon Savage wrote: This documentation already exists in that section. I'll amend my diff to reference this section. Something along the lines of "PHP 5's object model also significantly changes the way ob

Re: [PHP-DOC] oop5 basic rewrite informal RFC

2009-09-09 Thread Hannes Magnusson
On Wed, Sep 9, 2009 at 13:20, Brandon Savage wrote: > This documentation already exists in that section. > > I'll amend my diff to reference this section. Something along the lines of > "PHP 5's object model also significantly changes the way objects are > handled, and each variable representation

Re: [PHP-DOC] oop5 basic rewrite informal RFC

2009-09-09 Thread Brandon Savage
This documentation already exists in that section. I'll amend my diff to reference this section. Something along the lines of "PHP 5's object model also significantly changes the way objects are handled, and each variable representation contains an object identifier instead of the object itself. P

Re: [PHP-DOC] oop5 basic rewrite informal RFC

2009-09-09 Thread Hannes Magnusson
On Wed, Sep 9, 2009 at 01:29, Brandon Savage wrote: > However, each spot where the documentation states that objects are passed by > reference is wrong. See this blog post by Sara Golemon: > http://blog.libssh2.org/index.php?/archives/51-Youre-being-lied-to..html > [...] > > I'm not sure how to cha

Re: [PHP-DOC] oop5 basic rewrite informal RFC

2009-09-09 Thread Lars Torben Wilson
Philip Olson wrote: On Sep 8, 2009, at 11:32 PM, Lars Torben Wilson wrote: Lars Torben Wilson wrote: Lars Torben Wilson wrote: Daniel Convissor wrote: Hi Lars: In an earlier draft I had words to this effect, but it just got to be unwieldy, since it felt like if I explained that some peop

Re: [PHP-DOC] oop5 basic rewrite informal RFC

2009-09-08 Thread Philip Olson
On Sep 8, 2009, at 11:32 PM, Lars Torben Wilson wrote: Lars Torben Wilson wrote: Lars Torben Wilson wrote: Daniel Convissor wrote: Hi Lars: In an earlier draft I had words to this effect, but it just got to be unwieldy, since it felt like if I explained that some people call class var

Re: [PHP-DOC] oop5 basic rewrite informal RFC

2009-09-08 Thread Lars Torben Wilson
Lars Torben Wilson wrote: Lars Torben Wilson wrote: Daniel Convissor wrote: Hi Lars: In an earlier draft I had words to this effect, but it just got to be unwieldy, since it felt like if I explained that some people call class variables "properties", I should explain that others call them

Re: [PHP-DOC] oop5 basic rewrite informal RFC

2009-09-08 Thread Lars Torben Wilson
Greg Beaver wrote: Brandon Savage wrote: On Sep 8, 2009, at 6:12 PM, Daniel Convissor wrote: Hi Brandon: Nice stuff. Two qualms with the following: PHP 5's object model also significantly changes the way objects are passed, passing a pointer to the object rather than copying the ob

Re: [PHP-DOC] oop5 basic rewrite informal RFC

2009-09-08 Thread Greg Beaver
Brandon Savage wrote: > On Sep 8, 2009, at 6:12 PM, Daniel Convissor wrote: > >> Hi Brandon: >> >> Nice stuff. Two qualms with the following: >> >>PHP 5's object model also significantly changes the way objects >>are passed, passing a pointer to the object rather than copying >>the ob

Re: [PHP-DOC] oop5 basic rewrite informal RFC

2009-09-08 Thread Lars Torben Wilson
Lars Torben Wilson wrote: Daniel Convissor wrote: Hi Lars: In an earlier draft I had words to this effect, but it just got to be unwieldy, since it felt like if I explained that some people call class variables "properties", I should explain that others call them "members" or "member vari

Re: [PHP-DOC] oop5 basic rewrite informal RFC

2009-09-08 Thread Lars Torben Wilson
Daniel Convissor wrote: Hi Lars: In an earlier draft I had words to this effect, but it just got to be unwieldy, since it felt like if I explained that some people call class variables "properties", I should explain that others call them "members" or "member variables" or "attributes" or w

Re: [PHP-DOC] oop5 basic rewrite informal RFC

2009-09-08 Thread Brandon Savage
On Sep 8, 2009, at 6:12 PM, Daniel Convissor wrote: Hi Brandon: Nice stuff. Two qualms with the following: PHP 5's object model also significantly changes the way objects are passed, passing a pointer to the object rather than copying the object. First, "passed" is the followed imme

Re: [PHP-DOC] oop5 basic rewrite informal RFC

2009-09-08 Thread Daniel Convissor
Hi Brandon: Nice stuff. Two qualms with the following: PHP 5's object model also significantly changes the way objects are passed, passing a pointer to the object rather than copying the object. First, "passed" is the followed immediately by "passing." Pick a different word for o

Re: [PHP-DOC] oop5 basic rewrite informal RFC

2009-09-08 Thread Daniel Convissor
Hi Lars: > In an earlier draft I had words to this effect, but it just got to be > unwieldy, since it felt like if I explained that some people call class > variables "properties", I should explain that others call them "members" > or "member variables" or "attributes" or what-have-you. I'll

Re: [PHP-DOC] oop5 basic rewrite informal RFC

2009-09-08 Thread Brandon Savage
I'll see what I can do to submit a patch tonight containing new language for a "Differences Between PHP 4 and PHP 5" section. This is outlined to some degree in the "Migrating" documentation, but I still think it's a good idea. Does anyone know what we have to do in order to move the PHP 4

Re: [PHP-DOC] oop5 basic rewrite informal RFC

2009-09-08 Thread Brandon Savage
On Sep 8, 2009, at 5:08 PM, Lars Torben Wilson wrote: Brandon Savage wrote: On Sep 8, 2009, at 2:00 AM, Lars Torben Wilson wrote: Philip Olson wrote: Comments, criticisms, and feedback greatly appreciated! Sounds reasonable, and the more information the better :) And while doing this, it's p

Re: [PHP-DOC] oop5 basic rewrite informal RFC

2009-09-08 Thread Lars Torben Wilson
Brandon Savage wrote: On Sep 8, 2009, at 2:00 AM, Lars Torben Wilson wrote: Philip Olson wrote: Comments, criticisms, and feedback greatly appreciated! Sounds reasonable, and the more information the better :) And while doing this, it's probably worth thinking about how to ensure oop5 is a

Re: [PHP-DOC] oop5 basic rewrite informal RFC

2009-09-08 Thread Lars Torben Wilson
Brandon Savage wrote: Torben, This is good stuff. I have the following suggestions: 1. I would add links to the basic.xml page in the paragraph where you state "A class may contain its own variables, constants, and functions." I'd link to the sections on properties, constants and methods. S

Re: [PHP-DOC] oop5 basic rewrite informal RFC

2009-09-08 Thread Brandon Savage
Torben, This is good stuff. I have the following suggestions: 1. I would add links to the basic.xml page in the paragraph where you state "A class may contain its own variables, constants, and functions." I'd link to the sections on properties, constants and methods. 2. I would also add in parent

Re: [PHP-DOC] oop5 basic rewrite informal RFC

2009-09-08 Thread Brandon Savage
On Sep 8, 2009, at 2:00 AM, Lars Torben Wilson wrote: Philip Olson wrote: Comments, criticisms, and feedback greatly appreciated! Sounds reasonable, and the more information the better :) And while doing this, it's probably worth thinking about how to ensure oop5 is a first class citizen. M

Re: [PHP-DOC] oop5 basic rewrite informal RFC

2009-09-07 Thread Lars Torben Wilson
Philip Olson wrote: Comments, criticisms, and feedback greatly appreciated! Sounds reasonable, and the more information the better :) And while doing this, it's probably worth thinking about how to ensure oop5 is a first class citizen. Meaning, a person reads about OOP in terms of PHP 5 an

Re: [PHP-DOC] oop5 basic rewrite informal RFC

2009-09-07 Thread Philip Olson
Comments, criticisms, and feedback greatly appreciated! Sounds reasonable, and the more information the better :) And while doing this, it's probably worth thinking about how to ensure oop5 is a first class citizen. Meaning, a person reads about OOP in terms of PHP 5 and those who care ca

Re: [PHP-DOC] oop5 basic rewrite informal RFC

2009-09-07 Thread Lars Torben Wilson
Brandon Savage wrote: On Sep 7, 2009, at 3:47 AM, Lars Torben Wilson wrote: Hi all, While going through some bug reports I realized that the 'The Basics' section of the PHP 5 classes and objects section, as it stands, could use some attention. I've been going over it and and have rewritten

Re: [PHP-DOC] oop5 basic rewrite informal RFC

2009-09-07 Thread Brandon Savage
On Sep 7, 2009, at 3:47 AM, Lars Torben Wilson wrote: Hi all, While going through some bug reports I realized that the 'The Basics' section of the PHP 5 classes and objects section, as it stands, could use some attention. I've been going over it and and have rewritten much of it to be mor

[PHP-DOC] oop5 basic rewrite informal RFC

2009-09-07 Thread Lars Torben Wilson
Hi all, While going through some bug reports I realized that the 'The Basics' section of the PHP 5 classes and objects section, as it stands, could use some attention. I've been going over it and and have rewritten much of it to be more precise, and have also separated the class variables sec