Re: RFC: ZE2 and abstract

From: Date: Wed, 20 Nov 2002 13:24:27 +0000
Subject: Re: RFC: ZE2 and abstract
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-91349@lists.php.net to get a copy of this message
Added final now: http://marcus-boerger.de/php/ext/ze2 So we have: abstract [static] function '(' parameters ')' ';' [ final ] [ static ] function '(' parameters ')' '{' code '}' There is a check that you cannot overwrite a final function of cause and i also added a check that you cannot redeclare a function abstract. See test files on this. marcus At 16:55 19.11.2002, Marcus Börger wrote:
The link below contain a patch that allows abstract functions in ZE2. http://marcus-boerger.de/php/ext/ze2 abstract [static] function '(' parameters ')' ';' it would be possible to make the ';' optional. When an abstract method is called a fatal error is generated and execution stops. Another way of handling abstract would be to generate an E_WARNING or throw an exception. I experimented with the second one already but do not like it. I favor the first over the third but haven't tried that yet. The thinks i did: introduce T_ABSTRACT = "abstract" and modified the parser. added is_abstract after is_static in zend_function (and such) emit an E_ERROR when is_abstract is set in zend_init_static_method_call_handler & zend_init_method_call_handler marcus ------------------->>> mailto:mail@marcus-boerger.de <<<------------------ "We are animals among animals, all children of matter, save that we are the more disarmed. But since, unlike animals, we know that we must die, let us prepare for that moment by enjoying the life that has been given us by chance and for chance."
                               Umberto Eco, The island of the day before
--------------------->>> http://marcus-boerger.de <<<---------------------


« previous php.dev (#91349) next »