
May 19th, 2012, 10:43 AM
|
 |
Lost in code
|
|
|
|
Quote: | As for point 2 - valid argument (in fact I wrote a router class for URL parsing that does this) - but it's slightly different in nature to the example I gave. Nonetheless; given it is around the same lines; I will update my tutorial to include this exception. |
Ah, actually my example using extension was meant to show a "most complicated" situation. It works with other cases too, such as passing an instance of special_class_a to pub() or constructing an instance of "self" inside pub instead of using the argument. At least under PHP 5.3, the tutorial's example of self instantiation executes correctly with no errors.
However, this is sort of an edge case as objects are rarely used in this way.
|