ZE1 way:

 class MyClass {
    function MyClass()
    {
         die('MyClass is an abstract class');
    }
 }

ZE2 way:

 class AbstractClassException {
 }

 class MyClass {
    function MyClass()
    {
        throw new AbstractClassException();
    }
 }
 
On Sat, 09 Nov 2002, Jens Rehsack wrote:
> Hi,
> 
> does PHP4 with the ZE2 supports abstract function like Delphi or C++? 
> That would be very useful for class development, cause we can avoid 
> testing if a class is abstract if an abstract class couldn't be 
> instantiated?
> 
> Syntax could be like in C++
> class X
> {
>   X(){}
>   int y() = 0;
> }
> 
> or little bit more like pascal
> 
> class X
> {
>   X(){} // PHP
>   function x(); abstract;
> }
> 
> or
> 
> class X
> {
>   X(){} // PHP
>   abstract function x();
> }
> 
> Greetings,
> Jens
> -- 
> L     i  W     W     W  i                 Jens Rehsack
> L        W     W     W
> L     i   W   W W   W   i  nnn    gggg    LiWing IT-Services
> L     i    W W   W W    i  n  n  g   g
> LLLL  i     W     W     i  n  n  g   g    Friesenstraße 2
>                                   gggg    06112 Halle
>                                      g
>                                  g   g
> Tel.:  +49 - 3 45 - 5 17 05 91    ggg     e-Mail: <[EMAIL PROTECTED]>
> Fax:   +49 - 3 45 - 5 17 05 92            http://www.liwing.de/
> 
> 
> -- 
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php



-Andrei                                       http://www.gravitonic.com/
* A feature is a bug with seniority. *

--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to