Re: PHP5 Packages

From: Date: Tue, 09 Jul 2002 15:19:29 +0000
Subject: Re: PHP5 Packages
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-85863@lists.php.net to get a copy of this message
At 07:17 PM 7/9/2002, Melvyn Sopacua wrote:
At 17:05 9-7-2002, Zeev Suraski shared with all of us:
Basically, the Zend Engine 2 will allow the use of nested classes. So, classes will be able to contain other classes, as well as constants in addition to variables and methods.
That's already possible isn't it?
No it isn't (not in PHP 4 anyway, it's possible in the ZE2-based alpha).
How does this differ from: $this->db = new dbclient;
It's completely different. It addresses scoping issues, and gives you the same functionality as namespaces. For example: class foo {
        class bar {
                function method1()
                {
                }
        };
}; to call method1() externally, you would have to use something like foo::bar::method1(). It's not directly related to object instaniation. Zeev

« previous php.dev (#85863) next »