diff --git a/language/oop.xml b/language/oop.xml index 23d8c9382d..3b442e35d1 100644 --- a/language/oop.xml +++ b/language/oop.xml @@ -1,5 +1,5 @@ - + Classes and Objects (PHP 4) @@ -101,7 +101,7 @@ class test { - The name stdClass is used interally by + The name stdClass is used internally by Zend and is reserved. You cannot have a class named stdClass in PHP. @@ -196,13 +196,13 @@ $another_cart->add_item("0815", 3); functions add_item(), remove_item() and a variable items. These are distinct functions and variables. You can think of the objects as something similar to directories in a filesystem. In a filesystem you can - have two different files README.TXT, as long as they are in different - directories. Just like with directories where you'll have to type the - full pathname in order to reach each file from the toplevel directory, you - have to specify the complete name of the function you want to call: In PHP - terms, the toplevel directory would be the global namespace, and the - pathname separator would be ->. Thus, the names - $cart->items and + have two different files README.TXT, as long as they + are in different directories. Just like with directories where you'll have + to type the full pathname in order to reach each file from the toplevel + directory, you have to specify the complete name of the function you want to + call: in PHP terms, the toplevel directory would be the global namespace, + and the pathname separator would be ->. Thus, the + names $cart->items and $another_cart->items name two different variables. Note that the variable is named $cart->items, not $cart->$items, that is, a variable name in PHP has @@ -1133,8 +1133,8 @@ o1 !== o2 : TRUE Which is the output we will expect to obtain given the comparison rules - above. Only instances with the same values for their attributes and from the same - class are considered equal and identical. + above. Only instances with the same values for their attributes + and from the same class are considered equal and identical. Even in the cases where we have object composition, the same comparison