Re: PHP5 and class inheritance question

Re: PHP5 and class inheritance question

am 19.12.2007 18:01:06 von Logos

On Dec 13, 3:16 pm, Michael Fesser wrote:
> .oO(gosha bine)
>
> >in addition to what's already said, there's no need to use references
> >in php5.
>
> At least when working with objects. But nevertheless
>
> $foo = new Test();
> $a = $foo;
> $b = &$foo;
>
> are still different things, even in PHP 5. In some particular situations
> this might become an issue.
>
> Micha

Oooo...errr...ummm...could someone explain how exactly those are
different when using PHP5, then, please? If everything is done by
reference for objects, then to me $a and $b both look like pointers to
an object.

And...are objects always passed by reference to functions in PHP5,
then?

Re: PHP5 and class inheritance question

am 19.12.2007 18:17:15 von Steve

"Logos" wrote in message
news:629d3852-7498-474c-9ed7-de84ec3e98d5@e25g2000prg.google groups.com...
> On Dec 13, 3:16 pm, Michael Fesser wrote:
>> .oO(gosha bine)
>>
>> >in addition to what's already said, there's no need to use references
>> >in php5.
>>
>> At least when working with objects. But nevertheless
>>
>> $foo = new Test();
>> $a = $foo;
>> $b = &$foo;
>>
>> are still different things, even in PHP 5. In some particular situations
>> this might become an issue.
>>
>> Micha
>
> Oooo...errr...ummm...could someone explain how exactly those are
> different when using PHP5, then, please? If everything is done by
> reference for objects, then to me $a and $b both look like pointers to
> an object.
>
> And...are objects always passed by reference to functions in PHP5,
> then?

alright, get ready for a ton of flamage here after i'm done...

first, to be correct and accurate...objects are passed to functions by
reference, objects in arrays are by reference (i.e. when using foreach),
etc., etc.. variable assignment is by value. while $b = &$foo behaves like a
pointer in *every* way, in php there are no true c-style pointers. $b is
just an alias for $foo, a nickname...because of the amphersand (&). make
sense?

Re: PHP5 and class inheritance question

am 19.12.2007 18:43:47 von Steve

"Steve" wrote in message
news:qmcaj.44$Tt5.41@newsfe07.lga...
>
> "Logos" wrote in message
> news:629d3852-7498-474c-9ed7-de84ec3e98d5@e25g2000prg.google groups.com...
>> On Dec 13, 3:16 pm, Michael Fesser wrote:
>>> .oO(gosha bine)
>>>
>>> >in addition to what's already said, there's no need to use references
>>> >in php5.
>>>
>>> At least when working with objects. But nevertheless
>>>
>>> $foo = new Test();
>>> $a = $foo;
>>> $b = &$foo;
>>>
>>> are still different things, even in PHP 5. In some particular situations
>>> this might become an issue.
>>>
>>> Micha
>>
>> Oooo...errr...ummm...could someone explain how exactly those are
>> different when using PHP5, then, please? If everything is done by
>> reference for objects, then to me $a and $b both look like pointers to
>> an object.
>>
>> And...are objects always passed by reference to functions in PHP5,
>> then?
>
> alright, get ready for a ton of flamage here after i'm done...
>
> first, to be correct and accurate...objects are passed to functions by
> reference, objects in arrays are by reference (i.e. when using foreach),
> etc., etc.. variable assignment is by value. while $b = &$foo behaves like
> a pointer in *every* way, in php there are no true c-style pointers. $b is
> just an alias for $foo, a nickname...because of the amphersand (&). make
> sense?

here's a link for you to read having much discussion about referencing. in
particular, i have used some of the hacks shown there and have made a few of
my own based on the descriptions of how php is handling referencing in
different situation.

hth.

http://us.php.net/language.references.pass

Re: PHP5 and class inheritance question

am 19.12.2007 19:09:17 von Michael Fesser

..oO(Logos)

>On Dec 13, 3:16 pm, Michael Fesser wrote:
>
>> At least when working with objects. But nevertheless
>>
>> $foo = new Test();
>> $a = $foo;
>> $b = &$foo;
>>
>> are still different things, even in PHP 5. In some particular situations
>> this might become an issue.
>
>Oooo...errr...ummm...could someone explain how exactly those are
>different when using PHP5, then, please? If everything is done by
>reference for objects, then to me $a and $b both look like pointers to
>an object.

Don't confuse pointers with references, they are entirely different
things. PHP doesn't know pointers.

And correctly spoken objects in PHP 5 are _not_ passed by reference (at
least it's not what PHP calls a reference), even if it's still mentioned
that way on many websites. But it's wrong.

Internally objects are represented by a handle (a simple number), which
is what is moved around when you assign objects to variables, copy them
or pass them to a function. You're never working directly with the
object itself, but with its handle. Of course usually you won't notice
that, because it's handled transparently by PHP.

New Object Model
http://www.php.net/manual/en/migration5.oop.php

| [Objects in PHP 4] The drawback of this method was that semantically
| the whole object was copied when a variable was assigned, or passed as
| a parameter to a method. In the new approach, objects are referenced
| by handle, and not by value (one can think of a handle as an object's
| identifier).

Of course in addition to these object handles there are still the normal
PHP references, which you can use as well. So in the example code above
$a contains a copy of the object handle which was created beforehand,
while $b is a reference to that handle. That's a difference.

Here's a background article regarding this issue (and some more):

You're being lied to.
http://blog.libssh2.org/index.php?/archives/51-Youre-being-l ied-to..html

Micha

Re: PHP5 and class inheritance question

am 19.12.2007 20:04:08 von Steve

"Michael Fesser" wrote in message
news:0hlim3hgb5p7ifm2o13pjm6q4l0q5jhiim@4ax.com...
> .oO(Logos)
>
>>On Dec 13, 3:16 pm, Michael Fesser wrote:
>>
>>> At least when working with objects. But nevertheless
>>>
>>> $foo = new Test();
>>> $a = $foo;
>>> $b = &$foo;
>>>
>>> are still different things, even in PHP 5. In some particular situations
>>> this might become an issue.
>>
>>Oooo...errr...ummm...could someone explain how exactly those are
>>different when using PHP5, then, please? If everything is done by
>>reference for objects, then to me $a and $b both look like pointers to
>>an object.
>
> Don't confuse pointers with references, they are entirely different
> things. PHP doesn't know pointers.
>
> And correctly spoken objects in PHP 5 are _not_ passed by reference (at
> least it's not what PHP calls a reference), even if it's still mentioned
> that way on many websites. But it's wrong.
>
> Internally objects are represented by a handle (a simple number), which
> is what is moved around when you assign objects to variables, copy them
> or pass them to a function. You're never working directly with the
> object itself, but with its handle. Of course usually you won't notice
> that, because it's handled transparently by PHP.

michael, for people who come from a c/c++ background, what you've described
is *exactly* a pointer. the only difference in php is that rather than the
handle pointing to a memory address where information is stored, this php
handle points to a symbol table entry where information is stored.

in php, a reference (or byref) behaves *IDENTICALLY* to a c/c++ pointer.
there are somethings that you cannot do with this reference in php that you
could in other languages, however, the nature of the beast is the same. i
know that a reference in php is really just an alias of the symbol table
entry, but really that just seems a matter of symantics to me. i don't care
where things are stored at such a low level when i'm writing in a scripting
language. i care about behaviors.

> New Object Model
> http://www.php.net/manual/en/migration5.oop.php
>
> | [Objects in PHP 4] The drawback of this method was that semantically
> | the whole object was copied when a variable was assigned, or passed as
> | a parameter to a method. In the new approach, objects are referenced
> | by handle, and not by value (one can think of a handle as an object's
> | identifier).

to be accurate, the handle needn't be a number.

> Of course in addition to these object handles there are still the normal
> PHP references, which you can use as well.

please explain, as there are no 'special' references in php. you seem to be
comparing a reference directly with a thing that makes references work.

> So in the example code above
> $a contains a copy of the object handle which was created beforehand,
> while $b is a reference to that handle. That's a difference.

no, this is wholly wrong.

new object() creates an entry in the symbol table. that entry has a handle.
$foo becomes an alias for that handle. $a gets a new handle in the symbol
table whereby the entry data is copied into it from $foo. $b is an alias of
$foo.

$a is NOT a copy of the $foo's object handle - that would be an *alias*...a
*reference*. $foo's symbol data is copied into a new entry and $a gets the
handle for that entry. it's an important distinction.

> Here's a background article regarding this issue (and some more):
>
> You're being lied to.
> http://blog.libssh2.org/index.php?/archives/51-Youre-being-l ied-to..html

by whom, micha?

Re: PHP5 and class inheritance question

am 19.12.2007 21:21:49 von Michael Fesser

..oO(Steve)

>"Michael Fesser" wrote in message
>news:0hlim3hgb5p7ifm2o13pjm6q4l0q5jhiim@4ax.com...
>>
>> Internally objects are represented by a handle (a simple number), which
>> is what is moved around when you assign objects to variables, copy them
>> or pass them to a function. You're never working directly with the
>> object itself, but with its handle. Of course usually you won't notice
>> that, because it's handled transparently by PHP.
>
>michael, for people who come from a c/c++ background, what you've described
>is *exactly* a pointer.

A handle is not a pointer.

>the only difference in php is that rather than the
>handle pointing to a memory address where information is stored, this php
>handle points to a symbol table entry where information is stored.

Exactly. A pointer contains a memory address, a handle doesn't.

>in php, a reference (or byref) behaves *IDENTICALLY* to a c/c++ pointer.

Nope. References in PHP behave like references in C++, they're just
alias names for the same data structure. That's a big difference to
pointers, which don't exist in PHP. For example the memory address a
pointer points to could be another pointer as well. Such things are not
possible with references, neither in C++ nor in PHP. If you assign a
reference to a reference, it'll just become an additional alias.

>> New Object Model
>> http://www.php.net/manual/en/migration5.oop.php
>>
>> | [Objects in PHP 4] The drawback of this method was that semantically
>> | the whole object was copied when a variable was assigned, or passed as
>> | a parameter to a method. In the new approach, objects are referenced
>> | by handle, and not by value (one can think of a handle as an object's
>> | identifier).
>
>to be accurate, the handle needn't be a number.

Correct, but it probably makes it easier and more efficient.

>> Of course in addition to these object handles there are still the normal
>> PHP references, which you can use as well.
>
>please explain, as there are no 'special' references in php. you seem to be
>comparing a reference directly with a thing that makes references work.

The combination handle->object is kind of a special reference (I don't
like to call it like that to avoid too much confusion). Together with
the "normal" references it might even become reference->handle->object.

>> So in the example code above
>> $a contains a copy of the object handle which was created beforehand,
>> while $b is a reference to that handle. That's a difference.
>
>no, this is wholly wrong.
>
>new object() creates an entry in the symbol table. that entry has a handle.

That entry _is_ the handle. The associated object can be stored
elsewhere (I don't know how the ZE handles this internally, doesn't
matter anyway).

>$foo becomes an alias for that handle.

An alias would be a reference, which is not the case here.

>$a gets a new handle in the symbol
>table whereby the entry data is copied into it from $foo. $b is an alias of
>$foo.

Let's look at it this way:

$foo = 5;

$a = $foo;
$b = &$foo;

Same thing. Let the 5 be the internal number (the handle) of any object.
The first assignment copies the symbol table entry of $foo into $a.
Both $foo and $a now contain the same value, but of course in different
symbol table positions - both values can be changed without affecting
the other. The second assignment doesn't make a copy, but instead makes
$b an alias/a reference to the symbol table entry of $foo:

$foo ----.
+---> 5
$b ----´

$a --------> 5

This is a bit simplified and not exactly how it's done internally, but
it's how it behaves from the programmer's POV.

>$a is NOT a copy of the $foo's object handle - that would be an *alias*...a
>*reference*.

$b is the reference, $a is the copy. Back to our object handle, the
situation would look like this:

$foo ----.
+---> 5 ----.
$b ----´ +---> object #5
|
$a --------> 5 ----´

So if you now change $b to something else, it will also change $foo
because of the reference. But if you change $a, it will leave $b and
$foo untouched:

$foo ----.
+---> 5 --------> object #5
$b ----´

$a --------> 42

>> Here's a background article regarding this issue (and some more):
>>
>> You're being lied to.
>> http://blog.libssh2.org/index.php?/archives/51-Youre-being-l ied-to..html
>
>by whom, micha?

Mentioned in the first paragraph:

| If you're among the crowd who have migrated an OOP based application
| from PHP4 to PHP5, then I'm sure you've heard the expression "Objects
| are copied by reference by default in PHP5". Whoever told you that,
| was lying.

Micha

Re: PHP5 and class inheritance question

am 19.12.2007 22:47:57 von Steve

"Michael Fesser" wrote in message
news:71sim318adncjtc8m13mp0cek2kn1sbvfh@4ax.com...
> .oO(Steve)
>
>>"Michael Fesser" wrote in message
>>news:0hlim3hgb5p7ifm2o13pjm6q4l0q5jhiim@4ax.com...
>>>
>>> Internally objects are represented by a handle (a simple number), which
>>> is what is moved around when you assign objects to variables, copy them
>>> or pass them to a function. You're never working directly with the
>>> object itself, but with its handle. Of course usually you won't notice
>>> that, because it's handled transparently by PHP.
>>
>>michael, for people who come from a c/c++ background, what you've
>>described
>>is *exactly* a pointer.
>
> A handle is not a pointer.

a handle in php lets php lookup an entry in the symbol table.
a c-style pointer is value in a memory address that specifies where another
memory adress is located wherein the data resides for whatever the pointer
is trying to reference.

i was making no claims that a handle is or is not a pointer. i was pointing
out that they behave similarly...in fact, functionally identically in php.

>>the only difference in php is that rather than the
>>handle pointing to a memory address where information is stored, this php
>>handle points to a symbol table entry where information is stored.
>
> Exactly. A pointer contains a memory address, a handle doesn't.

again, this is irrelevant to behavior. the end result is the same whether
the data is in memory or in a symbolic table. i'm talking about behavior.
i'd be interested in that level of detail if i weren't using a *scripting*
language. for most however, it is enough to describe the behavior of php
references as pointers...especially for those whom have a background in
working with pointers. and for those who don't, 'pointer' is a great word to
describe the lookup nature of php references. not technically accurate,
however it is very effective and bypasses a lot of technical stuff they
really won't care less about.

>>in php, a reference (or byref) behaves *IDENTICALLY* to a c/c++ pointer.
>
> Nope. References in PHP behave like references in C++, they're just
> alias names for the same data structure.

did you miss a 'not' or 'don't' somewhere in there? you just agreed with me
yet preficed it with 'nope'. as for pointer v. reference in a specific
language? the differences or to minute to haggle over when it comes to
either being used to the *behavior* of references in php.

> That's a big difference to
> pointers, which don't exist in PHP.

behavior

> For example the memory address a
> pointer points to could be another pointer as well.

minutia. if i use a pointer that points to an nth degree of others, i'm
still manipulating a source object stored somewhere. whatever that looks
like behind the php scenes, i don't care...the end result is identicle.

> Such things are not
> possible with references, neither in C++ nor in PHP. If you assign a
> reference to a reference, it'll just become an additional alias.

but all still end up, regardless of mechanics, working on the same source
object.

>>> New Object Model
>>> http://www.php.net/manual/en/migration5.oop.php
>>>
>>> | [Objects in PHP 4] The drawback of this method was that semantically
>>> | the whole object was copied when a variable was assigned, or passed as
>>> | a parameter to a method. In the new approach, objects are referenced
>>> | by handle, and not by value (one can think of a handle as an object's
>>> | identifier).
>>
>>to be accurate, the handle needn't be a number.
>
> Correct, but it probably makes it easier and more efficient.

not sure that it does, fwir, the lookup on the symbol table is essentially
like using a key on an array, and there's no speed difference there whether
your key is numeric or alpha or both. were it stored in a db, i'm sure that
would be true though.

>>> Of course in addition to these object handles there are still the normal
>>> PHP references, which you can use as well.
>>
>>please explain, as there are no 'special' references in php. you seem to
>>be
>>comparing a reference directly with a thing that makes references work.
>
> The combination handle->object is kind of a special reference (I don't
> like to call it like that to avoid too much confusion). Together with
> the "normal" references it might even become reference->handle->object.

right, which is why i don't trifle with the technical differences we are
both aware of when i say pointer, reference, or alias. in the end, and no
matter how many -> are inbetween the variable and the object, the object is
always returned. i do get technical when using a technical language, just
not in php...esp. on usenet. i'm considering the audience.

>>> So in the example code above
>>> $a contains a copy of the object handle which was created beforehand,
>>> while $b is a reference to that handle. That's a difference.
>>
>>no, this is wholly wrong.
>>
>>new object() creates an entry in the symbol table. that entry has a
>>handle.
>
> That entry _is_ the handle. The associated object can be stored
> elsewhere (I don't know how the ZE handles this internally, doesn't
> matter anyway).

you mean the 'z entry' ... aka, zval, or the zend php engine? i'm a bit
fuzzy at present. the zval is a descriptive entry in the symbols table. one
of those descriptions is the 'handle'...they key of the data element in the
array, if you get the analogy. the handle is not itself, the entry but a set
of descriptors that constitute the full entry. does that address what you
are talking about here?

>>$foo becomes an alias for that handle.
>
> An alias would be a reference, which is not the case here.

alias == reference in php. the key word 'new' makes an entry which will have
a handle. $foo gets the reference/alias to that handle. the handle is
created whether or not 'new object()' is on a line by itself or if it is a
rhs assignment.

consider a static class. whether or not you put a getInstance() interface on
it or not, all of the proper descriptors for the class will be there when
the first use of one of its interfaces is accessed.

>>$a gets a new handle in the symbol
>>table whereby the entry data is copied into it from $foo. $b is an alias
>>of
>>$foo.
>
> Let's look at it this way:
>
> $foo = 5;
>
> $a = $foo;
> $b = &$foo;
>
> Same thing. Let the 5 be the internal number (the handle) of any object.

again, in the order of operations, 5 would have been the result of the rhs
creation of the object using the keyword 'new'. $foo is now an alias for
that object. but, proceed.

> The first assignment copies the symbol table entry of $foo into $a.

no, it changes the descriptors of the entry such that ref_count is two and
is_ref remains 0. upon the first write operation done on $a, the $foo entry
is copied into an entry just for $a and the values being changed in $a will
be seen in that entry.

> Both $foo and $a now contain the same value, but of course in different
> symbol table positions - both values can be changed without affecting
> the other.

yes and no. before a write operation, all entry details are kept in the $foo
entry. it saves processing hits and perserves speed that way. when a value
changes between either, you will have two independent entries created for
$foo and for $a...but at this point, i think i'm getting too
technical...which is my point in not worrying so much about using pointer,
alias, and reference interchangably.

> The second assignment doesn't make a copy, but instead makes
> $b an alias/a reference to the symbol table entry of $foo:

kind of, however from what i recall, the entry table looks almost identical
before a write operation. the difference in the byref entry is that is_ref
will be true...$b will have simply increased the ref_count - my crippled
memory notwithstanding of course.

> This is a bit simplified and not exactly how it's done internally, but
> it's how it behaves from the programmer's POV.

it's interesting just to focus on what happens to the rhs object variable in
each assignment. $foo will have it's object data changed by using interfaces
on $b. while its not memory, it sure seems that $b points to, or references,
or is an alias of $foo. see where i'm going in laymens terms? in laymens
terms, $a seems to be an independent copy of, or, clone of $foo. changing $a
has no effect on $foo.

>>$a is NOT a copy of the $foo's object handle - that would be an
>>*alias*...a
>>*reference*.
>
> $b is the reference, $a is the copy. Back to our object handle, the
> situation would look like this:

if $a is to be a copy of $foo, it will not have the same handle.

> $foo ----.
> +---> 5 ----.
> $b ----´ +---> object #5
> |
> $a --------> 5 ----´
>
> So if you now change $b to something else, it will also change $foo
> because of the reference. But if you change $a, it will leave $b and
> $foo untouched:
>
> $foo ----.
> +---> 5 --------> object #5
> $b ----´
>
> $a --------> 42

right, we have no confusion there...much less anywhere else i think. i'm
just a bit more comfortable using descriptive terms in describing how =& and
function arguments are performed in php. of course that changes with
context...but, php is a scripting language. the audience is too, more
relaxed.

>>> Here's a background article regarding this issue (and some more):
>>>
>>> You're being lied to.
>>> http://blog.libssh2.org/index.php?/archives/51-Youre-being-l ied-to..html
>>
>>by whom, micha?
>
> Mentioned in the first paragraph:
>
> | If you're among the crowd who have migrated an OOP based application
> | from PHP4 to PHP5, then I'm sure you've heard the expression "Objects
> | are copied by reference by default in PHP5". Whoever told you that,
> | was lying.

oh, so the 'whom' is 'whoever'...i'm grinning right now. :)

unless i read the article, which most won't, it seems as though you are
talking about someone who posted a comment in the thread. i don't see anyone
lying here. i'm glad you posted the paragraph, as i would have assumed you
were talking about me. :)

cheers

Re: PHP5 and class inheritance question

am 20.12.2007 00:52:56 von Michael Fesser

..oO(Steve)

>"Michael Fesser" wrote in message
>news:71sim318adncjtc8m13mp0cek2kn1sbvfh@4ax.com...
>>
>>>the only difference in php is that rather than the
>>>handle pointing to a memory address where information is stored, this php
>>>handle points to a symbol table entry where information is stored.
>>
>> Exactly. A pointer contains a memory address, a handle doesn't.
>
>again, this is irrelevant to behavior. the end result is the same whether
>the data is in memory or in a symbolic table. i'm talking about behavior.
>i'd be interested in that level of detail if i weren't using a *scripting*
>language. for most however, it is enough to describe the behavior of php
>references as pointers...especially for those whom have a background in
>working with pointers.

Especially those who have a background in pointers should know that PHP
references behave differently (which BTW is explicitly mentioned in the
manual and explained with an example).

>>>in php, a reference (or byref) behaves *IDENTICALLY* to a c/c++ pointer.
>>
>> Nope. References in PHP behave like references in C++, they're just
>> alias names for the same data structure.
>
>did you miss a 'not' or 'don't' somewhere in there?

No.

>you just agreed with me
>yet preficed it with 'nope'. as for pointer v. reference in a specific
>language?

PHP references behave like C++ references.
PHP references don't behave like C++ pointers.

>>>to be accurate, the handle needn't be a number.
>>
>> Correct, but it probably makes it easier and more efficient.
>
>not sure that it does, fwir, the lookup on the symbol table is essentially
>like using a key on an array, and there's no speed difference there whether
>your key is numeric or alpha or both. were it stored in a db, i'm sure that
>would be true though.

The objects themselves in PHP 5 are not necessarily stored in the symbol
table, they could be stored elsewhere, where a numeric index might speed
things up. But that's just a guess, I really don't want to look through
the sources that deep.

>right, which is why i don't trifle with the technical differences we are
>both aware of when i say pointer, reference, or alias. in the end, and no
>matter how many -> are inbetween the variable and the object, the object is
>always returned. i do get technical when using a technical language, just
>not in php...esp. on usenet. i'm considering the audience.

Even in PHP sometimes the technical details are required in order to
solve a problem or explain a particular behaviour. For example you can
use foreach with references:

foreach ($foo as &$bar) {
...
}

Dependent on what you do with $bar and whether it was used previously,
some strange things might happen, which can only be explained if you
know what goes on behind the scenes.

>> That entry _is_ the handle. The associated object can be stored
>> elsewhere (I don't know how the ZE handles this internally, doesn't
>> matter anyway).
>
>you mean the 'z entry'

Nope, I meant the Zend Engine itself. I don't know how and where it
actually stores its objects. The symbol table probably just contains the
object handle, the object itself could be anywhere else.

>>>$a gets a new handle in the symbol
>>>table whereby the entry data is copied into it from $foo. $b is an alias
>>>of
>>>$foo.
>>
>> Let's look at it this way:
>>
>> $foo = 5;
>>
>> $a = $foo;
>> $b = &$foo;
>>
>> Same thing. Let the 5 be the internal number (the handle) of any object.
>
>again, in the order of operations, 5 would have been the result of the rhs
>creation of the object using the keyword 'new'.

Yep.

>$foo is now an alias for
>that object. but, proceed.

$foo is just the name (or label) for a symbol table entry with the value
'5'.

>> The first assignment copies the symbol table entry of $foo into $a.
>
>no, it changes the descriptors of the entry such that ref_count is two and
>is_ref remains 0. upon the first write operation done on $a, the $foo entry
>is copied into an entry just for $a and the values being changed in $a will
>be seen in that entry.

Correct. That's what I meant some lines further down with "This is a bit
simplified ... from the programmer's POV" etc. Under the hood there's
copy-on-write, but from the outside it looks like an immediate copy.

This is about _behaviour_. ;)

>> The second assignment doesn't make a copy, but instead makes
>> $b an alias/a reference to the symbol table entry of $foo:
>
>kind of, however from what i recall, the entry table looks almost identical
>before a write operation. the difference in the byref entry is that is_ref
>will be true...$b will have simply increased the ref_count - my crippled
>memory notwithstanding of course.

All correct, but not part of the issue here.

>>>$a is NOT a copy of the $foo's object handle - that would be an
>>>*alias*...a
>>>*reference*.
>>
>> $b is the reference, $a is the copy. Back to our object handle, the
>> situation would look like this:
>
>if $a is to be a copy of $foo, it will not have the same handle.

I mean the object handle, the object identifier. Of course the same
handle can be stored in different variables (I consider this copies).
That's what you're doing all day when working with objects in PHP 5.
Nevertheless all these handle copies still identify the same object.

>right, we have no confusion there...much less anywhere else i think. i'm
>just a bit more comfortable using descriptive terms in describing how =& and
>function arguments are performed in php. of course that changes with
>context...but, php is a scripting language. the audience is too, more
>relaxed.

No problem with that.

The point was more or less just that there's still a difference between
= and =& in PHP 5, even when working with objects. If saying "objects in
PHP 5 are passed by reference by default" would be true and taken word
for word, then this code (taken from the linked site):

$a = new stdClass;
$b = $a;
$a = 'baz';

would destroy the object. But it doesn't. The object is still there and
accessible with $b. And in order to understand why it works this way,
you have to understand how objects are handled internally. Of course
only if you want. For most developers and in most situations it won't
matter anyway.

>> Mentioned in the first paragraph:
>>
>> | If you're among the crowd who have migrated an OOP based application
>> | from PHP4 to PHP5, then I'm sure you've heard the expression "Objects
>> | are copied by reference by default in PHP5". Whoever told you that,
>> | was lying.
>
>oh, so the 'whom' is 'whoever'...i'm grinning right now. :)

Yep. But when PHP 5 came up, I've read more than once about this "new
object handling by references" and such. I think I've even read it in
the PHP manual one time, but I'm not sure about it. All recent versions
explicitly mention the object handles.

>unless i read the article, which most won't, it seems as though you are
>talking about someone who posted a comment in the thread. i don't see anyone
>lying here.

No. It was just an addition to explain the difference between = and =&.

Micha

Re: PHP5 and class inheritance question

am 27.12.2007 15:40:45 von Jerry Stuckle

Steve wrote:
> "Michael Fesser" wrote in message
> news:0hlim3hgb5p7ifm2o13pjm6q4l0q5jhiim@4ax.com...
>> .oO(Logos)
>>
>>> On Dec 13, 3:16 pm, Michael Fesser wrote:
>>>
>>>> At least when working with objects. But nevertheless
>>>>
>>>> $foo = new Test();
>>>> $a = $foo;
>>>> $b = &$foo;
>>>>
>>>> are still different things, even in PHP 5. In some particular situations
>>>> this might become an issue.
>>> Oooo...errr...ummm...could someone explain how exactly those are
>>> different when using PHP5, then, please? If everything is done by
>>> reference for objects, then to me $a and $b both look like pointers to
>>> an object.
>> Don't confuse pointers with references, they are entirely different
>> things. PHP doesn't know pointers.
>>
>> And correctly spoken objects in PHP 5 are _not_ passed by reference (at
>> least it's not what PHP calls a reference), even if it's still mentioned
>> that way on many websites. But it's wrong.
>>
>> Internally objects are represented by a handle (a simple number), which
>> is what is moved around when you assign objects to variables, copy them
>> or pass them to a function. You're never working directly with the
>> object itself, but with its handle. Of course usually you won't notice
>> that, because it's handled transparently by PHP.
>
> michael, for people who come from a c/c++ background, what you've described
> is *exactly* a pointer. the only difference in php is that rather than the
> handle pointing to a memory address where information is stored, this php
> handle points to a symbol table entry where information is stored.
>

Wrong again, Stevie. A C++ pointer is not the same as a C++ reference.
And C doesn't have references, just as PHP doesn't have pointers.

> in php, a reference (or byref) behaves *IDENTICALLY* to a c/c++ pointer.
> there are somethings that you cannot do with this reference in php that you
> could in other languages, however, the nature of the beast is the same. i
> know that a reference in php is really just an alias of the symbol table
> entry, but really that just seems a matter of symantics to me. i don't care
> where things are stored at such a low level when i'm writing in a scripting
> language. i care about behaviors.
>

Wrong again. They behave much differently.



--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: PHP5 and class inheritance question

am 31.12.2007 03:15:07 von Steve

"Jerry Stuckle" wrote in message
news:mJidnRYAhdsKJO7anZ2dnUVZ_sbinZ2d@comcast.com...
> Steve wrote:
>> "Michael Fesser" wrote in message
>> news:0hlim3hgb5p7ifm2o13pjm6q4l0q5jhiim@4ax.com...
>>> .oO(Logos)
>>>
>>>> On Dec 13, 3:16 pm, Michael Fesser wrote:
>>>>
>>>>> At least when working with objects. But nevertheless
>>>>>
>>>>> $foo = new Test();
>>>>> $a = $foo;
>>>>> $b = &$foo;
>>>>>
>>>>> are still different things, even in PHP 5. In some particular
>>>>> situations
>>>>> this might become an issue.
>>>> Oooo...errr...ummm...could someone explain how exactly those are
>>>> different when using PHP5, then, please? If everything is done by
>>>> reference for objects, then to me $a and $b both look like pointers to
>>>> an object.
>>> Don't confuse pointers with references, they are entirely different
>>> things. PHP doesn't know pointers.
>>>
>>> And correctly spoken objects in PHP 5 are _not_ passed by reference (at
>>> least it's not what PHP calls a reference), even if it's still mentioned
>>> that way on many websites. But it's wrong.
>>>
>>> Internally objects are represented by a handle (a simple number), which
>>> is what is moved around when you assign objects to variables, copy them
>>> or pass them to a function. You're never working directly with the
>>> object itself, but with its handle. Of course usually you won't notice
>>> that, because it's handled transparently by PHP.
>>
>> michael, for people who come from a c/c++ background, what you've
>> described is *exactly* a pointer. the only difference in php is that
>> rather than the handle pointing to a memory address where information is
>> stored, this php handle points to a symbol table entry where information
>> is stored.
>>
>
> Wrong again, Stevie. A C++ pointer is not the same as a C++ reference.
> And C doesn't have references, just as PHP doesn't have pointers.
>
>> in php, a reference (or byref) behaves *IDENTICALLY* to a c/c++ pointer.
>> there are somethings that you cannot do with this reference in php that
>> you could in other languages, however, the nature of the beast is the
>> same. i know that a reference in php is really just an alias of the
>> symbol table entry, but really that just seems a matter of symantics to
>> me. i don't care where things are stored at such a low level when i'm
>> writing in a scripting language. i care about behaviors.
>>
>
> Wrong again. They behave much differently.

read, jerry, read. show me how in *PHP* the behavior is different. you've
tried before and failed. i'm not talking about the differences in c/c++/c#
(as they *are* different there)...we're talking about php.

Re: PHP5 and class inheritance question

am 31.12.2007 03:16:40 von Jerry Stuckle

Steve wrote:
> "Jerry Stuckle" wrote in message
> news:mJidnRYAhdsKJO7anZ2dnUVZ_sbinZ2d@comcast.com...
>> Steve wrote:
>>> "Michael Fesser" wrote in message
>>> news:0hlim3hgb5p7ifm2o13pjm6q4l0q5jhiim@4ax.com...
>>>> .oO(Logos)
>>>>
>>>>> On Dec 13, 3:16 pm, Michael Fesser wrote:
>>>>>
>>>>>> At least when working with objects. But nevertheless
>>>>>>
>>>>>> $foo = new Test();
>>>>>> $a = $foo;
>>>>>> $b = &$foo;
>>>>>>
>>>>>> are still different things, even in PHP 5. In some particular
>>>>>> situations
>>>>>> this might become an issue.
>>>>> Oooo...errr...ummm...could someone explain how exactly those are
>>>>> different when using PHP5, then, please? If everything is done by
>>>>> reference for objects, then to me $a and $b both look like pointers to
>>>>> an object.
>>>> Don't confuse pointers with references, they are entirely different
>>>> things. PHP doesn't know pointers.
>>>>
>>>> And correctly spoken objects in PHP 5 are _not_ passed by reference (at
>>>> least it's not what PHP calls a reference), even if it's still mentioned
>>>> that way on many websites. But it's wrong.
>>>>
>>>> Internally objects are represented by a handle (a simple number), which
>>>> is what is moved around when you assign objects to variables, copy them
>>>> or pass them to a function. You're never working directly with the
>>>> object itself, but with its handle. Of course usually you won't notice
>>>> that, because it's handled transparently by PHP.
>>> michael, for people who come from a c/c++ background, what you've
>>> described is *exactly* a pointer. the only difference in php is that
>>> rather than the handle pointing to a memory address where information is
>>> stored, this php handle points to a symbol table entry where information
>>> is stored.
>>>
>> Wrong again, Stevie. A C++ pointer is not the same as a C++ reference.
>> And C doesn't have references, just as PHP doesn't have pointers.
>>
>>> in php, a reference (or byref) behaves *IDENTICALLY* to a c/c++ pointer.
>>> there are somethings that you cannot do with this reference in php that
>>> you could in other languages, however, the nature of the beast is the
>>> same. i know that a reference in php is really just an alias of the
>>> symbol table entry, but really that just seems a matter of symantics to
>>> me. i don't care where things are stored at such a low level when i'm
>>> writing in a scripting language. i care about behaviors.
>>>
>> Wrong again. They behave much differently.
>
> read, jerry, read. show me how in *PHP* the behavior is different. you've
> tried before and failed. i'm not talking about the differences in c/c++/c#
> (as they *are* different there)...we're talking about php.
>
>
>

Stoopid. Show me where PHP has pointers. It doesn't.

And you're the one who claimed that references and pointers behave
identically in C/C++. Wrong again.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: PHP5 and class inheritance question

am 31.12.2007 04:28:19 von Michael Fesser

..oO(Steve)

>"Jerry Stuckle" wrote in message
>news:mJidnRYAhdsKJO7anZ2dnUVZ_sbinZ2d@comcast.com...
>
>> Wrong again, Stevie. A C++ pointer is not the same as a C++ reference.
>> And C doesn't have references, just as PHP doesn't have pointers.
>>
>>> in php, a reference (or byref) behaves *IDENTICALLY* to a c/c++ pointer.
>>> there are somethings that you cannot do with this reference in php that
>>> you could in other languages, however, the nature of the beast is the
>>> same. i know that a reference in php is really just an alias of the
>>> symbol table entry, but really that just seems a matter of symantics to
>>> me. i don't care where things are stored at such a low level when i'm
>>> writing in a scripting language. i care about behaviors.
>>>
>>
>> Wrong again. They behave much differently.
>
>read, jerry, read. show me how in *PHP* the behavior is different.

All these things can't be done with references as they exist in PHP:

* pointer arithmetics
* pointer pointers
* working with the pointer itself or the value it points to (which is
the basis for the first two things)
* ...

There are _no_ pointers in PHP. A reference is _not_ a pointer.

And since PHP references behave identically to C++ references (both are
symbol table alias names), your statement above would also mean that C++
references behave identically to pointers as well. Would you tell that
to a C++ programmer?

Micha

Re: PHP5 and class inheritance question

am 31.12.2007 05:05:13 von Steve

"Jerry Stuckle" wrote in message
news:V9idndyZVKOozOXanZ2dnUVZ_qPinZ2d@comcast.com...
> Steve wrote:
>> "Jerry Stuckle" wrote in message
>> news:mJidnRYAhdsKJO7anZ2dnUVZ_sbinZ2d@comcast.com...
>>> Steve wrote:
>>>> "Michael Fesser" wrote in message
>>>> news:0hlim3hgb5p7ifm2o13pjm6q4l0q5jhiim@4ax.com...
>>>>> .oO(Logos)
>>>>>
>>>>>> On Dec 13, 3:16 pm, Michael Fesser wrote:
>>>>>>
>>>>>>> At least when working with objects. But nevertheless
>>>>>>>
>>>>>>> $foo = new Test();
>>>>>>> $a = $foo;
>>>>>>> $b = &$foo;
>>>>>>>
>>>>>>> are still different things, even in PHP 5. In some particular
>>>>>>> situations
>>>>>>> this might become an issue.
>>>>>> Oooo...errr...ummm...could someone explain how exactly those are
>>>>>> different when using PHP5, then, please? If everything is done by
>>>>>> reference for objects, then to me $a and $b both look like pointers
>>>>>> to
>>>>>> an object.
>>>>> Don't confuse pointers with references, they are entirely different
>>>>> things. PHP doesn't know pointers.
>>>>>
>>>>> And correctly spoken objects in PHP 5 are _not_ passed by reference
>>>>> (at
>>>>> least it's not what PHP calls a reference), even if it's still
>>>>> mentioned
>>>>> that way on many websites. But it's wrong.
>>>>>
>>>>> Internally objects are represented by a handle (a simple number),
>>>>> which
>>>>> is what is moved around when you assign objects to variables, copy
>>>>> them
>>>>> or pass them to a function. You're never working directly with the
>>>>> object itself, but with its handle. Of course usually you won't notice
>>>>> that, because it's handled transparently by PHP.
>>>> michael, for people who come from a c/c++ background, what you've
>>>> described is *exactly* a pointer. the only difference in php is that
>>>> rather than the handle pointing to a memory address where information
>>>> is stored, this php handle points to a symbol table entry where
>>>> information is stored.
>>>>
>>> Wrong again, Stevie. A C++ pointer is not the same as a C++ reference.
>>> And C doesn't have references, just as PHP doesn't have pointers.
>>>
>>>> in php, a reference (or byref) behaves *IDENTICALLY* to a c/c++
>>>> pointer. there are somethings that you cannot do with this reference in
>>>> php that you could in other languages, however, the nature of the beast
>>>> is the same. i know that a reference in php is really just an alias of
>>>> the symbol table entry, but really that just seems a matter of
>>>> symantics to me. i don't care where things are stored at such a low
>>>> level when i'm writing in a scripting language. i care about behaviors.
>>>>
>>> Wrong again. They behave much differently.
>>
>> read, jerry, read. show me how in *PHP* the behavior is different. you've
>> tried before and failed. i'm not talking about the differences in
>> c/c++/c# (as they *are* different there)...we're talking about php.
>
> Stoopid. Show me where PHP has pointers. It doesn't.
>
> And you're the one who claimed that references and pointers behave
> identically in C/C++. Wrong again.

nope...i just said they were different in c, c++, and c#. i said for *PHP*
the behavior is essentially the same. i never said php had pointers...but
that the behavioral description is similar to pointers...and gave the
caveats about the actual terms and definitions so that is was clear that
there is technical difference.

learn to read.

Re: PHP5 and class inheritance question

am 31.12.2007 05:07:32 von Steve

"Michael Fesser" wrote in message
news:elngn3d4quaalmvpmu5fl724rs29asuj1c@4ax.com...
> .oO(Steve)
>
>>"Jerry Stuckle" wrote in message
>>news:mJidnRYAhdsKJO7anZ2dnUVZ_sbinZ2d@comcast.com...
>>
>>> Wrong again, Stevie. A C++ pointer is not the same as a C++ reference.
>>> And C doesn't have references, just as PHP doesn't have pointers.
>>>
>>>> in php, a reference (or byref) behaves *IDENTICALLY* to a c/c++
>>>> pointer.
>>>> there are somethings that you cannot do with this reference in php that
>>>> you could in other languages, however, the nature of the beast is the
>>>> same. i know that a reference in php is really just an alias of the
>>>> symbol table entry, but really that just seems a matter of symantics to
>>>> me. i don't care where things are stored at such a low level when i'm
>>>> writing in a scripting language. i care about behaviors.
>>>>
>>>
>>> Wrong again. They behave much differently.
>>
>>read, jerry, read. show me how in *PHP* the behavior is different.
>
> All these things can't be done with references as they exist in PHP:
>
> * pointer arithmetics
> * pointer pointers
> * working with the pointer itself or the value it points to (which is
> the basis for the first two things)
> * ...
>
> There are _no_ pointers in PHP. A reference is _not_ a pointer.
>
> And since PHP references behave identically to C++ references (both are
> symbol table alias names), your statement above would also mean that C++
> references behave identically to pointers as well. Would you tell that
> to a C++ programmer?

no, i wouldn't. again though micha, i explained that using the term
'pointer' for someone starting out in php makes understanding how aliasing
works a bit simpler.

Re: PHP5 and class inheritance question

am 31.12.2007 14:34:58 von Jerry Stuckle

Steve wrote:
> "Jerry Stuckle" wrote in message
> news:V9idndyZVKOozOXanZ2dnUVZ_qPinZ2d@comcast.com...
>> Steve wrote:
>>> "Jerry Stuckle" wrote in message
>>> news:mJidnRYAhdsKJO7anZ2dnUVZ_sbinZ2d@comcast.com...
>>>> Steve wrote:
>>>>> "Michael Fesser" wrote in message
>>>>> news:0hlim3hgb5p7ifm2o13pjm6q4l0q5jhiim@4ax.com...
>>>>>> .oO(Logos)
>>>>>>
>>>>>>> On Dec 13, 3:16 pm, Michael Fesser wrote:
>>>>>>>
>>>>>>>> At least when working with objects. But nevertheless
>>>>>>>>
>>>>>>>> $foo = new Test();
>>>>>>>> $a = $foo;
>>>>>>>> $b = &$foo;
>>>>>>>>
>>>>>>>> are still different things, even in PHP 5. In some particular
>>>>>>>> situations
>>>>>>>> this might become an issue.
>>>>>>> Oooo...errr...ummm...could someone explain how exactly those are
>>>>>>> different when using PHP5, then, please? If everything is done by
>>>>>>> reference for objects, then to me $a and $b both look like pointers
>>>>>>> to
>>>>>>> an object.
>>>>>> Don't confuse pointers with references, they are entirely different
>>>>>> things. PHP doesn't know pointers.
>>>>>>
>>>>>> And correctly spoken objects in PHP 5 are _not_ passed by reference
>>>>>> (at
>>>>>> least it's not what PHP calls a reference), even if it's still
>>>>>> mentioned
>>>>>> that way on many websites. But it's wrong.
>>>>>>
>>>>>> Internally objects are represented by a handle (a simple number),
>>>>>> which
>>>>>> is what is moved around when you assign objects to variables, copy
>>>>>> them
>>>>>> or pass them to a function. You're never working directly with the
>>>>>> object itself, but with its handle. Of course usually you won't notice
>>>>>> that, because it's handled transparently by PHP.
>>>>> michael, for people who come from a c/c++ background, what you've
>>>>> described is *exactly* a pointer. the only difference in php is that
>>>>> rather than the handle pointing to a memory address where information
>>>>> is stored, this php handle points to a symbol table entry where
>>>>> information is stored.
>>>>>
>>>> Wrong again, Stevie. A C++ pointer is not the same as a C++ reference.
>>>> And C doesn't have references, just as PHP doesn't have pointers.
>>>>
>>>>> in php, a reference (or byref) behaves *IDENTICALLY* to a c/c++
>>>>> pointer. there are somethings that you cannot do with this reference in
>>>>> php that you could in other languages, however, the nature of the beast
>>>>> is the same. i know that a reference in php is really just an alias of
>>>>> the symbol table entry, but really that just seems a matter of
>>>>> symantics to me. i don't care where things are stored at such a low
>>>>> level when i'm writing in a scripting language. i care about behaviors.
>>>>>
>>>> Wrong again. They behave much differently.
>>> read, jerry, read. show me how in *PHP* the behavior is different. you've
>>> tried before and failed. i'm not talking about the differences in
>>> c/c++/c# (as they *are* different there)...we're talking about php.
>> Stoopid. Show me where PHP has pointers. It doesn't.
>>
>> And you're the one who claimed that references and pointers behave
>> identically in C/C++. Wrong again.
>
> nope...i just said they were different in c, c++, and c#. i said for *PHP*
> the behavior is essentially the same. i never said php had pointers...but
> that the behavioral description is similar to pointers...and gave the
> caveats about the actual terms and definitions so that is was clear that
> there is technical difference.
>
> learn to read.
>
>
>

"i said for *PHP* the behavior is essentially the same."

"i never said php had pointers"

You're so dense you can't even see the contradiction on your own statements.

You're just a stoopid troll, Stevie, who uses people in a desperate
attempt to get some kind of acceptance. You don't use your real name
here because you're so afraid people will find out you're not really a
programmer.

But you're stoopidity has given you away once again. Any programmer
with more than two weeks of *real experience* in C++ programming knows
the difference between pointers and references - and knows how wrong you
are.

You're the worst kind of loser.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: PHP5 and class inheritance question

am 31.12.2007 14:37:33 von Jerry Stuckle

Michael Fesser wrote:
> .oO(Steve)
>
>> "Jerry Stuckle" wrote in message
>> news:mJidnRYAhdsKJO7anZ2dnUVZ_sbinZ2d@comcast.com...
>>
>>> Wrong again, Stevie. A C++ pointer is not the same as a C++ reference.
>>> And C doesn't have references, just as PHP doesn't have pointers.
>>>
>>>> in php, a reference (or byref) behaves *IDENTICALLY* to a c/c++ pointer.
>>>> there are somethings that you cannot do with this reference in php that
>>>> you could in other languages, however, the nature of the beast is the
>>>> same. i know that a reference in php is really just an alias of the
>>>> symbol table entry, but really that just seems a matter of symantics to
>>>> me. i don't care where things are stored at such a low level when i'm
>>>> writing in a scripting language. i care about behaviors.
>>>>
>>> Wrong again. They behave much differently.
>> read, jerry, read. show me how in *PHP* the behavior is different.
>
> All these things can't be done with references as they exist in PHP:
>
> * pointer arithmetics
> * pointer pointers
> * working with the pointer itself or the value it points to (which is
> the basis for the first two things)
> * ...
>
> There are _no_ pointers in PHP. A reference is _not_ a pointer.
>
> And since PHP references behave identically to C++ references (both are
> symbol table alias names), your statement above would also mean that C++
> references behave identically to pointers as well. Would you tell that
> to a C++ programmer?
>
> Micha
>

Hi, Micha,

Forget Stevie. He's not worth it.

A more appropriate place for him would be alt.stoopid.trolls instead of
someplace real programmers hang out.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: PHP5 and class inheritance question

am 01.01.2008 21:39:04 von Steve

"Jerry Stuckle" wrote in message
news:t-qdnY0_MPmgbeXanZ2dnUVZ_oytnZ2d@comcast.com...
> Steve wrote:
>> "Jerry Stuckle" wrote in message
>> news:V9idndyZVKOozOXanZ2dnUVZ_qPinZ2d@comcast.com...
>>> Steve wrote:
>>>> "Jerry Stuckle" wrote in message
>>>> news:mJidnRYAhdsKJO7anZ2dnUVZ_sbinZ2d@comcast.com...
>>>>> Steve wrote:
>>>>>> "Michael Fesser" wrote in message
>>>>>> news:0hlim3hgb5p7ifm2o13pjm6q4l0q5jhiim@4ax.com...
>>>>>>> .oO(Logos)
>>>>>>>
>>>>>>>> On Dec 13, 3:16 pm, Michael Fesser wrote:
>>>>>>>>
>>>>>>>>> At least when working with objects. But nevertheless
>>>>>>>>>
>>>>>>>>> $foo = new Test();
>>>>>>>>> $a = $foo;
>>>>>>>>> $b = &$foo;
>>>>>>>>>
>>>>>>>>> are still different things, even in PHP 5. In some particular
>>>>>>>>> situations
>>>>>>>>> this might become an issue.
>>>>>>>> Oooo...errr...ummm...could someone explain how exactly those are
>>>>>>>> different when using PHP5, then, please? If everything is done by
>>>>>>>> reference for objects, then to me $a and $b both look like pointers
>>>>>>>> to
>>>>>>>> an object.
>>>>>>> Don't confuse pointers with references, they are entirely different
>>>>>>> things. PHP doesn't know pointers.
>>>>>>>
>>>>>>> And correctly spoken objects in PHP 5 are _not_ passed by reference
>>>>>>> (at
>>>>>>> least it's not what PHP calls a reference), even if it's still
>>>>>>> mentioned
>>>>>>> that way on many websites. But it's wrong.
>>>>>>>
>>>>>>> Internally objects are represented by a handle (a simple number),
>>>>>>> which
>>>>>>> is what is moved around when you assign objects to variables, copy
>>>>>>> them
>>>>>>> or pass them to a function. You're never working directly with the
>>>>>>> object itself, but with its handle. Of course usually you won't
>>>>>>> notice
>>>>>>> that, because it's handled transparently by PHP.
>>>>>> michael, for people who come from a c/c++ background, what you've
>>>>>> described is *exactly* a pointer. the only difference in php is that
>>>>>> rather than the handle pointing to a memory address where information
>>>>>> is stored, this php handle points to a symbol table entry where
>>>>>> information is stored.
>>>>>>
>>>>> Wrong again, Stevie. A C++ pointer is not the same as a C++
>>>>> reference. And C doesn't have references, just as PHP doesn't have
>>>>> pointers.
>>>>>
>>>>>> in php, a reference (or byref) behaves *IDENTICALLY* to a c/c++
>>>>>> pointer. there are somethings that you cannot do with this reference
>>>>>> in php that you could in other languages, however, the nature of the
>>>>>> beast is the same. i know that a reference in php is really just an
>>>>>> alias of the symbol table entry, but really that just seems a matter
>>>>>> of symantics to me. i don't care where things are stored at such a
>>>>>> low level when i'm writing in a scripting language. i care about
>>>>>> behaviors.
>>>>>>
>>>>> Wrong again. They behave much differently.
>>>> read, jerry, read. show me how in *PHP* the behavior is different.
>>>> you've tried before and failed. i'm not talking about the differences
>>>> in c/c++/c# (as they *are* different there)...we're talking about php.
>>> Stoopid. Show me where PHP has pointers. It doesn't.
>>>
>>> And you're the one who claimed that references and pointers behave
>>> identically in C/C++. Wrong again.
>>
>> nope...i just said they were different in c, c++, and c#. i said for
>> *PHP* the behavior is essentially the same. i never said php had
>> pointers...but that the behavioral description is similar to
>> pointers...and gave the caveats about the actual terms and definitions so
>> that is was clear that there is technical difference.
>>
>> learn to read.
>
> "i said for *PHP* the behavior is essentially the same."
>
> "i never said php had pointers"
>
> You're so dense you can't even see the contradiction on your own
> statements.

*behavior*...context clue, dumbass.

> You're just a stoopid troll, Stevie, who uses people in a desperate
> attempt to get some kind of acceptance. You don't use your real name here
> because you're so afraid people will find out you're not really a
> programmer.

is that right.

> But you're stoopidity has given you away once again. Any programmer with
> more than two weeks of *real experience* in C++ programming knows the
> difference between pointers and references - and knows how wrong you are.

php != c++ ... your point is moot.

> You're the worst kind of loser.

is that anything like a dipshit who keeps posting the same drivel day after
day just to have someone to chat with? sounds more like you jerry than me.

Re: PHP5 and class inheritance question

am 01.01.2008 21:52:38 von Jerry Stuckle

Steve wrote:
> "Jerry Stuckle" wrote in message
> news:t-qdnY0_MPmgbeXanZ2dnUVZ_oytnZ2d@comcast.com...
>> Steve wrote:
>>> "Jerry Stuckle" wrote in message
>>> news:V9idndyZVKOozOXanZ2dnUVZ_qPinZ2d@comcast.com...
>>>> Steve wrote:
>>>>> "Jerry Stuckle" wrote in message
>>>>> news:mJidnRYAhdsKJO7anZ2dnUVZ_sbinZ2d@comcast.com...
>>>>>> Steve wrote:
>>>>>>> "Michael Fesser" wrote in message
>>>>>>> news:0hlim3hgb5p7ifm2o13pjm6q4l0q5jhiim@4ax.com...
>>>>>>>> .oO(Logos)
>>>>>>>>
>>>>>>>>> On Dec 13, 3:16 pm, Michael Fesser wrote:
>>>>>>>>>
>>>>>>>>>> At least when working with objects. But nevertheless
>>>>>>>>>>
>>>>>>>>>> $foo = new Test();
>>>>>>>>>> $a = $foo;
>>>>>>>>>> $b = &$foo;
>>>>>>>>>>
>>>>>>>>>> are still different things, even in PHP 5. In some particular
>>>>>>>>>> situations
>>>>>>>>>> this might become an issue.
>>>>>>>>> Oooo...errr...ummm...could someone explain how exactly those are
>>>>>>>>> different when using PHP5, then, please? If everything is done by
>>>>>>>>> reference for objects, then to me $a and $b both look like pointers
>>>>>>>>> to
>>>>>>>>> an object.
>>>>>>>> Don't confuse pointers with references, they are entirely different
>>>>>>>> things. PHP doesn't know pointers.
>>>>>>>>
>>>>>>>> And correctly spoken objects in PHP 5 are _not_ passed by reference
>>>>>>>> (at
>>>>>>>> least it's not what PHP calls a reference), even if it's still
>>>>>>>> mentioned
>>>>>>>> that way on many websites. But it's wrong.
>>>>>>>>
>>>>>>>> Internally objects are represented by a handle (a simple number),
>>>>>>>> which
>>>>>>>> is what is moved around when you assign objects to variables, copy
>>>>>>>> them
>>>>>>>> or pass them to a function. You're never working directly with the
>>>>>>>> object itself, but with its handle. Of course usually you won't
>>>>>>>> notice
>>>>>>>> that, because it's handled transparently by PHP.
>>>>>>> michael, for people who come from a c/c++ background, what you've
>>>>>>> described is *exactly* a pointer. the only difference in php is that
>>>>>>> rather than the handle pointing to a memory address where information
>>>>>>> is stored, this php handle points to a symbol table entry where
>>>>>>> information is stored.
>>>>>>>
>>>>>> Wrong again, Stevie. A C++ pointer is not the same as a C++
>>>>>> reference. And C doesn't have references, just as PHP doesn't have
>>>>>> pointers.
>>>>>>
>>>>>>> in php, a reference (or byref) behaves *IDENTICALLY* to a c/c++
>>>>>>> pointer. there are somethings that you cannot do with this reference
>>>>>>> in php that you could in other languages, however, the nature of the
>>>>>>> beast is the same. i know that a reference in php is really just an
>>>>>>> alias of the symbol table entry, but really that just seems a matter
>>>>>>> of symantics to me. i don't care where things are stored at such a
>>>>>>> low level when i'm writing in a scripting language. i care about
>>>>>>> behaviors.
>>>>>>>
>>>>>> Wrong again. They behave much differently.
>>>>> read, jerry, read. show me how in *PHP* the behavior is different.
>>>>> you've tried before and failed. i'm not talking about the differences
>>>>> in c/c++/c# (as they *are* different there)...we're talking about php.
>>>> Stoopid. Show me where PHP has pointers. It doesn't.
>>>>
>>>> And you're the one who claimed that references and pointers behave
>>>> identically in C/C++. Wrong again.
>>> nope...i just said they were different in c, c++, and c#. i said for
>>> *PHP* the behavior is essentially the same. i never said php had
>>> pointers...but that the behavioral description is similar to
>>> pointers...and gave the caveats about the actual terms and definitions so
>>> that is was clear that there is technical difference.
>>>
>>> learn to read.
>> "i said for *PHP* the behavior is essentially the same."
>>
>> "i never said php had pointers"
>>
>> You're so dense you can't even see the contradiction on your own
>> statements.
>
> *behavior*...context clue, dumbass.
>

You're so dense you can't even see the contradiction in your own
statement, stoopid troll.

And if you're talking behavior, you've just shown you have no idea about
how to use pointer.

You've just once again opened your "mouth" and removed all doubt about
your stoopidity.

>> You're just a stoopid troll, Stevie, who uses people in a desperate
>> attempt to get some kind of acceptance. You don't use your real name here
>> because you're so afraid people will find out you're not really a
>> programmer.
>
> is that right.
>

Yep. You give yourself away virtually every time you respond to a post
here.

>> But you're stoopidity has given you away once again. Any programmer with
>> more than two weeks of *real experience* in C++ programming knows the
>> difference between pointers and references - and knows how wrong you are.
>
> php != c++ ... your point is moot.
>

Then why did you bring it up? Backpedaling again, stoopid troll?

>> You're the worst kind of loser.
>
> is that anything like a dipshit who keeps posting the same drivel day after
> day just to have someone to chat with? sounds more like you jerry than me.
>

Just the truth, Stevie. But you can't handle it. You could always stop
responding. But I know you won't.

Now I hear your mommy calling. Better go see what she wants.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: PHP5 and class inheritance question

am 02.01.2008 19:54:57 von Steve

"Jerry Stuckle" wrote in message
news:Z6qdnRHvoubZNefanZ2dnUVZ_sKqnZ2d@comcast.com...

>>> "i said for *PHP* the behavior is essentially the same."
>>>
>>> "i never said php had pointers"
>>>
>>> You're so dense you can't even see the contradiction on your own
>>> statements.
>>
>> *behavior*...context clue, dumbass.
>>
>
> You're so dense you can't even see the contradiction in your own
> statement, stoopid troll.

no, it's just amusing that you can't read what's being said rather than what
you'd like to see.

> And if you're talking behavior, you've just shown you have no idea about
> how to use pointer.

you're referring to c-style language pointers. again, fuckwit, i'm talking
about an easy way to describe to & references in *php* to someone who
doesn't have any experience with the construct. 'pointing' seems to get the
point across faster that other descriptives...even though it is not
technically accurate - a point i was *obvious* in making *before* using the
terminology. look up the term 'caveat'. that's the exact word i used in
preface of the description.

illiterate twit.


> You've just once again opened your "mouth" and removed all doubt about
> your stoopidity.

a cliche you just mangled...and have no idea who originated it - outside of
google.

>>> You're just a stoopid troll, Stevie, who uses people in a desperate
>>> attempt to get some kind of acceptance. You don't use your real name
>>> here because you're so afraid people will find out you're not really a
>>> programmer.
>>
>> is that right.
>>
>
> Yep. You give yourself away virtually every time you respond to a post
> here.

you're funny.

>>> But you're stoopidity has given you away once again. Any programmer
>>> with more than two weeks of *real experience* in C++ programming knows
>>> the difference between pointers and references - and knows how wrong you
>>> are.
>>
>> php != c++ ... your point is moot.
>>
>
> Then why did you bring it up? Backpedaling again, stoopid troll?

i didn't. micha did initially. secondarily, you did. my first mention was
the *caveat* that the *behavioral* description was not literally correct
with c-style languages.

>>> You're the worst kind of loser.
>>
>> is that anything like a dipshit who keeps posting the same drivel day
>> after day just to have someone to chat with? sounds more like you jerry
>> than me.
>
> Just the truth, Stevie. But you can't handle it. You could always stop
> responding. But I know you won't.

again, jerry, for me to be effected emotionally by your insults, i'd have to
care about your opinion. i don't. you can stop trolling now...it has no
effect.

further, you still respond because *you're* a troll.

> Now I hear your mommy calling. Better go see what she wants.

lol. she did call. having christmas together with the rest of the fam. are
you trying to say you've found out my age. i think your only safe assumption
there is that i am younger than you. that's a *safe* assumption simply for
the fact that i know your *exact* age...and MOST EVERYONE here is younger
than you. :)

cheers, pops.

Re: PHP5 and class inheritance question

am 02.01.2008 19:57:52 von Steve

"Jerry Stuckle" wrote in message
news:t-qdnYw_MPlNbeXanZ2dnUVZ_ozinZ2d@comcast.com...
> Michael Fesser wrote:
>> .oO(Steve)
>>
>>> "Jerry Stuckle" wrote in message
>>> news:mJidnRYAhdsKJO7anZ2dnUVZ_sbinZ2d@comcast.com...
>>>
>>>> Wrong again, Stevie. A C++ pointer is not the same as a C++ reference.
>>>> And C doesn't have references, just as PHP doesn't have pointers.
>>>>
>>>>> in php, a reference (or byref) behaves *IDENTICALLY* to a c/c++
>>>>> pointer. there are somethings that you cannot do with this reference
>>>>> in php that you could in other languages, however, the nature of the
>>>>> beast is the same. i know that a reference in php is really just an
>>>>> alias of the symbol table entry, but really that just seems a matter
>>>>> of symantics to me. i don't care where things are stored at such a low
>>>>> level when i'm writing in a scripting language. i care about
>>>>> behaviors.
>>>>>
>>>> Wrong again. They behave much differently.
>>> read, jerry, read. show me how in *PHP* the behavior is different.
>>
>> All these things can't be done with references as they exist in PHP:
>>
>> * pointer arithmetics
>> * pointer pointers
>> * working with the pointer itself or the value it points to (which is
>> the basis for the first two things)
>> * ...
>>
>> There are _no_ pointers in PHP. A reference is _not_ a pointer.
>>
>> And since PHP references behave identically to C++ references (both are
>> symbol table alias names), your statement above would also mean that C++
>> references behave identically to pointers as well. Would you tell that
>> to a C++ programmer?
>>
>> Micha
>>
>
> Hi, Micha,
>
> Forget Stevie. He's not worth it.

apparently 'worth it' enough for you to spend an exhorbidant amount of time
badgering. :)

> A more appropriate place for him would be alt.stoopid.trolls instead of
> someplace real programmers hang out.

well jerry, you're a teacher, not a programmer. so, double-entendre
intended, you can get lost.

Re: PHP5 and class inheritance question

am 02.01.2008 23:55:16 von Jerry Stuckle

Steve wrote:
> "Jerry Stuckle" wrote in message
> news:Z6qdnRHvoubZNefanZ2dnUVZ_sKqnZ2d@comcast.com...
>
>>>> "i said for *PHP* the behavior is essentially the same."
>>>>
>>>> "i never said php had pointers"
>>>>
>>>> You're so dense you can't even see the contradiction on your own
>>>> statements.
>>> *behavior*...context clue, dumbass.
>>>
>> You're so dense you can't even see the contradiction in your own
>> statement, stoopid troll.
>
> no, it's just amusing that you can't read what's being said rather than what
> you'd like to see.
>

Naw, I can read what you said. But you can't! ROFLMAO!

>> And if you're talking behavior, you've just shown you have no idea about
>> how to use pointer.
>
> you're referring to c-style language pointers. again, fuckwit, i'm talking
> about an easy way to describe to & references in *php* to someone who
> doesn't have any experience with the construct. 'pointing' seems to get the
> point across faster that other descriptives...even though it is not
> technically accurate - a point i was *obvious* in making *before* using the
> terminology. look up the term 'caveat'. that's the exact word i used in
> preface of the description.
>

PHP doesn't have pointers. Period. End of statement. You cant
describe references in relationship to something which doesn't exist.

> illiterate twit.
>

Projecting again, huh, Stevie?

>
>> You've just once again opened your "mouth" and removed all doubt about
>> your stoopidity.
>
> a cliche you just mangled...and have no idea who originated it - outside of
> google.
>

No mangling. Just paraphrasing to match the circumstances. But I'm
sorry - I used a word which was too big for you.

And if you must know, it was Mark Twain - one of the many familiar
sayings he coined.

>>>> You're just a stoopid troll, Stevie, who uses people in a desperate
>>>> attempt to get some kind of acceptance. You don't use your real name
>>>> here because you're so afraid people will find out you're not really a
>>>> programmer.
>>> is that right.
>>>
>> Yep. You give yourself away virtually every time you respond to a post
>> here.
>
> you're funny.
>

Thank you.

>>>> But you're stoopidity has given you away once again. Any programmer
>>>> with more than two weeks of *real experience* in C++ programming knows
>>>> the difference between pointers and references - and knows how wrong you
>>>> are.
>>> php != c++ ... your point is moot.
>>>
>> Then why did you bring it up? Backpedaling again, stoopid troll?
>
> i didn't. micha did initially. secondarily, you did. my first mention was
> the *caveat* that the *behavioral* description was not literally correct
> with c-style languages.
>

You're the one who tried to compare PHP references to something which
doesn't exist.

>>>> You're the worst kind of loser.
>>> is that anything like a dipshit who keeps posting the same drivel day
>>> after day just to have someone to chat with? sounds more like you jerry
>>> than me.
>> Just the truth, Stevie. But you can't handle it. You could always stop
>> responding. But I know you won't.
>
> again, jerry, for me to be effected emotionally by your insults, i'd have to
> care about your opinion. i don't. you can stop trolling now...it has no
> effect.
>

Quite frankly, I don't give a damn if your AFFECTED or not. But you do
need to get a dictionary.

> further, you still respond because *you're* a troll.
>

ROFLMAO!

>> Now I hear your mommy calling. Better go see what she wants.
>
> lol. she did call. having christmas together with the rest of the fam. are
> you trying to say you've found out my age. i think your only safe assumption
> there is that i am younger than you. that's a *safe* assumption simply for
> the fact that i know your *exact* age...and MOST EVERYONE here is younger
> than you. :)
>
> cheers, pops.
>
>

No, there are several here who are older than I am. But it's not hard to
find out how old I am. I don't try to hide behind an alias.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: PHP5 and class inheritance question

am 03.01.2008 05:35:57 von Steve

"Jerry Stuckle" wrote in message
news:VuydnRBwdfYti-HanZ2dnUVZ_vOlnZ2d@comcast.com...

> PHP doesn't have pointers. Period. End of statement. You cant describe
> references in relationship to something which doesn't exist.

sure you can. for the newbie, 'pointer' means nothing. they have no
knowledge of pointers as defined by another language. that is WHY i use the
term to describe references in php...because people 'get' it.

and for taking you literally...bollocks. it's called inference. try and use
it sometime, as it is the key to intelligence.

>> illiterate twit.
>>
>
> Projecting again, huh, Stevie?

no, stucco.

>>
>>> You've just once again opened your "mouth" and removed all doubt about
>>> your stoopidity.
>>
>> a cliche you just mangled...and have no idea who originated it - outside
>> of google.
>>
>
> No mangling. Just paraphrasing to match the circumstances. But I'm
> sorry - I used a word which was too big for you.

and by 'stoopid', you're trying to emulate another troll...OMH? or, is that
just more confirmation of your illiteracy?

> And if you must know, it was Mark Twain - one of the many familiar sayings
> he coined.

lol...googling again?

>>>>> You're just a stoopid troll, Stevie, who uses people in a desperate
>>>>> attempt to get some kind of acceptance. You don't use your real name
>>>>> here because you're so afraid people will find out you're not really a
>>>>> programmer.
>>>> is that right.
>>>>
>>> Yep. You give yourself away virtually every time you respond to a post
>>> here.
>>
>> you're funny.
>>
>
> Thank you.

no, no...not a compliment.

>>>>> But you're stoopidity has given you away once again. Any programmer
>>>>> with more than two weeks of *real experience* in C++ programming knows
>>>>> the difference between pointers and references - and knows how wrong
>>>>> you are.
>>>> php != c++ ... your point is moot.
>>>>
>>> Then why did you bring it up? Backpedaling again, stoopid troll?
>>
>> i didn't. micha did initially. secondarily, you did. my first mention was
>> the *caveat* that the *behavioral* description was not literally correct
>> with c-style languages.
>>
>
> You're the one who tried to compare PHP references to something which
> doesn't exist.

rof! pointers DO exist. if pointers DID exist in *PHP*, i'd have used a
different descriptive for references in *PHP*. but, i've already addressed
that...and your statement here is simply stupid as you leave out the context
for the claim 'doesn't exist'.

>>>>> You're the worst kind of loser.
>>>> is that anything like a dipshit who keeps posting the same drivel day
>>>> after day just to have someone to chat with? sounds more like you jerry
>>>> than me.
>>> Just the truth, Stevie. But you can't handle it. You could always stop
>>> responding. But I know you won't.
>>
>> again, jerry, for me to be effected emotionally by your insults, i'd have
>> to care about your opinion. i don't. you can stop trolling now...it has
>> no effect.
>>
>
> Quite frankly, I don't give a damn if your AFFECTED or not. But you do
> need to get a dictionary.

then why bother hurling them, lame-ass.

>> further, you still respond because *you're* a troll.
>>
>
> ROFLMAO!
>
>>> Now I hear your mommy calling. Better go see what she wants.
>>
>> lol. she did call. having christmas together with the rest of the fam.
>> are you trying to say you've found out my age. i think your only safe
>> assumption there is that i am younger than you. that's a *safe*
>> assumption simply for the fact that i know your *exact* age...and MOST
>> EVERYONE here is younger than you. :)
>>
>> cheers, pops.
>
> No, there are several here who are older than I am. But it's not hard to
> find out how old I am. I don't try to hide behind an alias.

good for you. your point?

Re: PHP5 and class inheritance question

am 03.01.2008 05:53:58 von Jerry Stuckle

Steve wrote:
> "Jerry Stuckle" wrote in message
> news:VuydnRBwdfYti-HanZ2dnUVZ_vOlnZ2d@comcast.com...
>
>> PHP doesn't have pointers. Period. End of statement. You cant describe
>> references in relationship to something which doesn't exist.
>
> sure you can. for the newbie, 'pointer' means nothing. they have no
> knowledge of pointers as defined by another language. that is WHY i use the
> term to describe references in php...because people 'get' it.
>

Sure - YOU CAN. But intelligent people know better.

> and for taking you literally...bollocks. it's called inference. try and use
> it sometime, as it is the key to intelligence.
>

You wouldn't know inference if it bit you in the ass.

>>> illiterate twit.
>>>
>> Projecting again, huh, Stevie?
>
> no, stucco.
>

ROFLMAO! I haven't heard that one since third grade. But that's about
your intelligence level.

>>>> You've just once again opened your "mouth" and removed all doubt about
>>>> your stoopidity.
>>> a cliche you just mangled...and have no idea who originated it - outside
>>> of google.
>>>
>> No mangling. Just paraphrasing to match the circumstances. But I'm
>> sorry - I used a word which was too big for you.
>
> and by 'stoopid', you're trying to emulate another troll...OMH? or, is that
> just more confirmation of your illiteracy?
>

Nope. Just trying to phrase things in words you can understand.

>> And if you must know, it was Mark Twain - one of the many familiar sayings
>> he coined.
>
> lol...googling again?
>

Nope. Unlike you, I didn't need to google it.

>>>>>> You're just a stoopid troll, Stevie, who uses people in a desperate
>>>>>> attempt to get some kind of acceptance. You don't use your real name
>>>>>> here because you're so afraid people will find out you're not really a
>>>>>> programmer.
>>>>> is that right.
>>>>>
>>>> Yep. You give yourself away virtually every time you respond to a post
>>>> here.
>>> you're funny.
>>>
>> Thank you.
>
> no, no...not a compliment.
>

From you, it is.

>>>>>> But you're stoopidity has given you away once again. Any programmer
>>>>>> with more than two weeks of *real experience* in C++ programming knows
>>>>>> the difference between pointers and references - and knows how wrong
>>>>>> you are.
>>>>> php != c++ ... your point is moot.
>>>>>
>>>> Then why did you bring it up? Backpedaling again, stoopid troll?
>>> i didn't. micha did initially. secondarily, you did. my first mention was
>>> the *caveat* that the *behavioral* description was not literally correct
>>> with c-style languages.
>>>
>> You're the one who tried to compare PHP references to something which
>> doesn't exist.
>
> rof! pointers DO exist. if pointers DID exist in *PHP*, i'd have used a
> different descriptive for references in *PHP*. but, i've already addressed
> that...and your statement here is simply stupid as you leave out the context
> for the claim 'doesn't exist'.
>

No, PHP pointers do not exist. And that's what you tried to compare
reference to you.

And if you're taking about C/C++ pointers, it shows how little you
understand those pointers. Not at all the same.

But only programmers understand that, so it's no wonder you get them
mixed up.

>>>>>> You're the worst kind of loser.
>>>>> is that anything like a dipshit who keeps posting the same drivel day
>>>>> after day just to have someone to chat with? sounds more like you jerry
>>>>> than me.
>>>> Just the truth, Stevie. But you can't handle it. You could always stop
>>>> responding. But I know you won't.
>>> again, jerry, for me to be effected emotionally by your insults, i'd have
>>> to care about your opinion. i don't. you can stop trolling now...it has
>>> no effect.
>>>
>> Quite frankly, I don't give a damn if your AFFECTED or not. But you do
>> need to get a dictionary.
>
> then why bother hurling them, lame-ass.
>

Then why do you bother responding, STOOPID TROLL. Because it does
affect you! ROFLMAO!

If it didn't affect you, you'd just ignore them and not respond. Your
responses are proof that you're lying - AGAIN.

>>> further, you still respond because *you're* a troll.
>>>
>> ROFLMAO!
>>
>>>> Now I hear your mommy calling. Better go see what she wants.
>>> lol. she did call. having christmas together with the rest of the fam.
>>> are you trying to say you've found out my age. i think your only safe
>>> assumption there is that i am younger than you. that's a *safe*
>>> assumption simply for the fact that i know your *exact* age...and MOST
>>> EVERYONE here is younger than you. :)
>>>
>>> cheers, pops.
>> No, there are several here who are older than I am. But it's not hard to
>> find out how old I am. I don't try to hide behind an alias.
>
> good for you. your point?
>
>
>

Nothing. YOU brought it up, STOOPID!

But there isn't anyone here YOUNGER than you - at least in intellectual
maturity.

Not to mention your lack of programming knowledge.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: PHP5 and class inheritance question

am 03.01.2008 06:05:31 von Michael Fesser

..oO(Steve)

>rof! pointers DO exist.

Not in PHP. If you still insist on that, maybe you should file a bug
report, because the manual also says that references are no pointers ...

>if pointers DID exist in *PHP*, i'd have used a
>different descriptive for references in *PHP*. but, i've already addressed
>that...and your statement here is simply stupid as you leave out the context
>for the claim 'doesn't exist'.

It doesn't matter how you personally define "pointer" and "reference",
you can name them whatever you like. But in computer science both terms
have a well-defined meaning and behaviour. And by these definitions PHP
references are _no_ pointers. It's that simple.

EOT for me
Micha

Re: PHP5 and class inheritance question

am 03.01.2008 06:08:08 von unknown

Post removed (X-No-Archive: yes)

Re: PHP5 and class inheritance question

am 03.01.2008 16:52:30 von Steve

"Jerry Stuckle" wrote in message
news:fMWdneiJEscK9-HanZ2dnUVZ_tWtnZ2d@comcast.com...
> Steve wrote:
>> "Jerry Stuckle" wrote in message
>> news:VuydnRBwdfYti-HanZ2dnUVZ_vOlnZ2d@comcast.com...
>>
>>> PHP doesn't have pointers. Period. End of statement. You cant
>>> describe references in relationship to something which doesn't exist.
>>
>> sure you can. for the newbie, 'pointer' means nothing. they have no
>> knowledge of pointers as defined by another language. that is WHY i use
>> the term to describe references in php...because people 'get' it.
>>
>
> Sure - YOU CAN. But intelligent people know better.

did you say something, jerr?

>> and for taking you literally...bollocks. it's called inference. try and
>> use it sometime, as it is the key to intelligence.
>>
>
> You wouldn't know inference if it bit you in the ass.

sorry, what was that again, jerr?

>>>> illiterate twit.
>>>>
>>> Projecting again, huh, Stevie?
>>
>> no, stucco.
>>
>
> ROFLMAO! I haven't heard that one since third grade. But that's about
> your intelligence level.

kinda like 'stevie', huh. lol.

your spray is being blown back in your face there, jerr. aim down-wind...it
helps.

>>>>> You've just once again opened your "mouth" and removed all doubt about
>>>>> your stoopidity.
>>>> a cliche you just mangled...and have no idea who originated it -
>>>> outside of google.
>>>>
>>> No mangling. Just paraphrasing to match the circumstances. But I'm
>>> sorry - I used a word which was too big for you.
>>
>> and by 'stoopid', you're trying to emulate another troll...OMH? or, is
>> that just more confirmation of your illiteracy?
>>
>
> Nope. Just trying to phrase things in words you can understand.

after i describe it, most generally need no further explaination...and the
conversation typically ends with 'oh, that makes sense. i get it now.
thanks'.

>>> And if you must know, it was Mark Twain - one of the many familiar
>>> sayings he coined.
>>
>> lol...googling again?
>>
>
> Nope. Unlike you, I didn't need to google it.

where do you get this stuff, jerry? how do you 'infer' that i needed to
google anything? ad-homs work best if you can make it stick rather than just
taking the 'i'm rubber, you're glue' approach.

>>>>>>> You're just a stoopid troll, Stevie, who uses people in a desperate
>>>>>>> attempt to get some kind of acceptance. You don't use your real
>>>>>>> name here because you're so afraid people will find out you're not
>>>>>>> really a programmer.
>>>>>> is that right.
>>>>>>
>>>>> Yep. You give yourself away virtually every time you respond to a
>>>>> post here.
>>>> you're funny.
>>>>
>>> Thank you.
>>
>> no, no...not a compliment.
>>
>
> From you, it is.

ok, i guess that makes sense if i take you to be truly desperate for such
affections.

>>>>>>> But you're stoopidity has given you away once again. Any programmer
>>>>>>> with more than two weeks of *real experience* in C++ programming
>>>>>>> knows the difference between pointers and references - and knows how
>>>>>>> wrong you are.
>>>>>> php != c++ ... your point is moot.
>>>>>>
>>>>> Then why did you bring it up? Backpedaling again, stoopid troll?
>>>> i didn't. micha did initially. secondarily, you did. my first mention
>>>> was the *caveat* that the *behavioral* description was not literally
>>>> correct with c-style languages.
>>>>
>>> You're the one who tried to compare PHP references to something which
>>> doesn't exist.
>>
>> rof! pointers DO exist. if pointers DID exist in *PHP*, i'd have used a
>> different descriptive for references in *PHP*. but, i've already
>> addressed that...and your statement here is simply stupid as you leave
>> out the context for the claim 'doesn't exist'.
>>
>
> No, PHP pointers do not exist. And that's what you tried to compare
> reference to you.

you really should have said php pointers the first time. we've been talking
about php *and* other c-style languages. just making the statement is stupid
without context, dumbass. as for:

"And that's what you tried to compare reference to you."

makes you sound like a 60 year old mongol who just picked up a book whos
title translated means "english for dummies". try again, illiterate fuckwit.

> And if you're taking about C/C++ pointers, it shows how little you
> understand those pointers. Not at all the same.

get a clue jerry. i'm talking about php. it just happens that in *php* when
i say more than one variable 'points' to the same thing, the noobie gets it
a lot quicker than saying they 'refer' to the same thing.

> But only programmers understand that, so it's no wonder you get them mixed
> up.

no, you just have a great propensity to trip over your own feet. read for
comprehension. may i further recommend, "reading english for dummies"...and
that book used small words and short sentences, which should help. inference
is biting you in the ass...haven't you noticed?

>>>>>>> You're the worst kind of loser.
>>>>>> is that anything like a dipshit who keeps posting the same drivel day
>>>>>> after day just to have someone to chat with? sounds more like you
>>>>>> jerry than me.
>>>>> Just the truth, Stevie. But you can't handle it. You could always
>>>>> stop responding. But I know you won't.
>>>> again, jerry, for me to be effected emotionally by your insults, i'd
>>>> have to care about your opinion. i don't. you can stop trolling
>>>> now...it has no effect.
>>>>
>>> Quite frankly, I don't give a damn if your AFFECTED or not. But you do
>>> need to get a dictionary.
>>
>> then why bother hurling them, lame-ass.
>>
>
> Then why do you bother responding, STOOPID TROLL. Because it does affect
> you! ROFLMAO!

bad conclusion, jerr. it's entertaining. it doesn't effect me in the least.

and at least OMH has a litany of 'creatively' spelled alternatives.
'stoopid' is just getting plain old. were i you, i'd consider completing
your jedi training by doing *everything* OMH does...and not just some.

anyway, answer my question first. why bother?

> If it didn't affect you, you'd just ignore them and not respond. Your
> responses are proof that you're lying - AGAIN.

they don't. you seem to think they do...so, good for you. i'm feeding the
troll named jerry stucco. it's quite amusing. it has nothing to do with your
ability to ad-hom like an 8 year old...or your lack of ability.

>>>> further, you still respond because *you're* a troll.
>>>>
>>> ROFLMAO!
>>>
>>>>> Now I hear your mommy calling. Better go see what she wants.
>>>> lol. she did call. having christmas together with the rest of the fam.
>>>> are you trying to say you've found out my age. i think your only safe
>>>> assumption there is that i am younger than you. that's a *safe*
>>>> assumption simply for the fact that i know your *exact* age...and MOST
>>>> EVERYONE here is younger than you. :)
>>>>
>>>> cheers, pops.
>>> No, there are several here who are older than I am. But it's not hard to
>>> find out how old I am. I don't try to hide behind an alias.
>>
>> good for you. your point?
>
> Nothing. YOU brought it up, STOOPID!

i brought up you saying there are several here who are older than i [you]
am? lol. am i to take that three sentence blurt to mean something? i think
your point *was* nothing...regardless of who brought up what. that's why i
have to directly ask what your point was.

> But there isn't anyone here YOUNGER than you - at least in intellectual
> maturity.

lol. no, you are proof to the contrary. what's worse is that whatever my
maturity level, it is more close to my age than the distance between your
physical age and immaturity. i guess you, old dog, did not learn and cannot
hope to resolve the casm between the two.

> Not to mention your lack of programming knowledge.

brought to you by 'stucco-productions', jerry stucco, executive
director..."the world projects from us".

Re: PHP5 and class inheritance question

am 03.01.2008 16:55:18 von Steve

"Michael Fesser" wrote in message
news:ckqon3t6rskvp6m3ceiub2tuuqcab9e5sv@4ax.com...
> .oO(Steve)
>
>>rof! pointers DO exist.
>
> Not in PHP. If you still insist on that, maybe you should file a bug
> report, because the manual also says that references are no pointers ...

i've been clear micha. pointers do NOT exist in php but DO exist in other
languages. the point was that jerry didn't specify the context - php or
other language.

>>if pointers DID exist in *PHP*, i'd have used a
>>different descriptive for references in *PHP*. but, i've already addressed
>>that...and your statement here is simply stupid as you leave out the
>>context
>>for the claim 'doesn't exist'.
>
> It doesn't matter how you personally define "pointer" and "reference",
> you can name them whatever you like. But in computer science both terms
> have a well-defined meaning and behaviour. And by these definitions PHP
> references are _no_ pointers. It's that simple.

which is fine. however, php noobs don't care about those particulars. and,
they seem to 'get it' faster describing it one way v. another.