suggestions for ze2

From: Date: Tue, 14 Jan 2003 11:41:37 +0000
Subject: suggestions for ze2
Groups: php.dev 
Request: Send a blank email to php-dev+get-93448@lists.php.net to get a copy of this message
Hi, I've got some suggestions for zendengine2 (hopefully not too late). What about an identificator for destrucotrs in a class like in c++? I mean something like this : <?php class Foo {
    function Foo
    {
        // Constructor
    }
    function ~Foo
    {
        // Destructor
    }
} And an idea about cloning of objects.. What about an operator for doing that ? $cloned_object = %$object; Last thing would be a possibility for overloading operators. For example if you have two instances of a multi-dimensional position class : $vector1 = new Pos(12,24,42); $vector2 = new Pos(53,23,15); $vector1 += $vector2; In the class definition that could look like : class Pos {
    operator +($left)
    {
        // Error handling for equal sice of public dimensions array
        foreach($left->dimensions as $id => $value)
            $this->dimensions[$id] += $value;
    }
} Where there already discussions about these things? I think that would make the sourcecode shorter, more understandable and also looking nicer ;) I now that the first two suggestions are just taken out of another programming language called c++, but I think that these are usefull concepts. bye -- IPv6 + TCPA + wrecked Palladium server = NO COFFE!

« previous php.dev (#93448) next »