Mantis - Quercus
Viewing Issue Advanced Details
3644 minor always 08-21-09 02:42 08-27-09 12:29
tlandmann  
nam  
normal  
closed 4.0.0  
fixed  
none    
none 4.0.2  
0003644: Quercus allows to make non-abstract function abstract again (incompatibility with standard PHP)
The following script renders an error in standard PHP 5.2.6:

Fatal error: Cannot make non abstract method test2::function1() abstract in class test3 in [...]/test6.php on line 19


In Quercus it executes and prints:

outer start
1
outer end



-----------------------

<?php

abstract class test1
{
    public abstract function function1();
}

class test2 extends test1
{
    public function function1()
    {
        echo "1\n";
    }
}

abstract class test3 extends test2
{
    public abstract function function1();
}

class test4 extends test3
{
    public function function1()
    {
        echo "outer start\n";
        parent::function1();
        echo "outer end\n";
    }
}

$testvar=new test4;

$testvar->function1();

?>

Notes
(0004188)
nam   
08-27-09 12:29   
php/09jh