- Output for 5.4.0 - 5.4.16
- Fatal error: Declaration of C::__construct() must be compatible with A::__construct($a) in JNtfo on line 28
Process exited with code 255. - Output for 5.3.0 - 5.3.29
<?php
abstract class A
{
protected $a;
protected $b;
abstract public function __construct($a);
}
class B extends A
{
public function __construct($a)
{
$this->a = $a;
}
}
class C extends A
{
public function __construct($a, $b)
{
$this->a = $a;
$this->b = $b;
}
}
$b = new B(1);
$c = new C(1, 2);