Re: late static binding

From: Date: Mon, 28 May 2007 19:58:49 +0000
Subject: Re: late static binding
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-29849@lists.php.net to get a copy of this message
parties involved could help clear up for me. Basically, I am wondering if anybody has tossed around the idea of having a scope of child::, just like
Well, this exactly name makes little sense, since class has only one self and one parent, but can have many children, so child:: does not uniquely identify the context. However, the idea of having dynamic scope that refers to the class which was mentioned during the static call was indeed raised a number of times. The problem there is that since currently the engine does not preserve that class scope, it is not accessible inside the static call.
My second question on this topic would be how hard would it be to create a child scope in the Zend Engine? Since I am not a very experienced C
I don't really understand - what is "child scope"?
programmer, this may be a naive question, but if Zend is smart enough to know who the inherited class object is, could it be much more difficult to know who did the inheriting?
Yes, it could and it is. There's an unique link from child to parent, but there's no any link from parent to child, neither this link is possible since parent can have many children which could come into existence at any time during the lifecycle of the script. -- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/

« previous php.internals (#29849) next »