- Output for 8.2.0 - 8.2.27, 8.3.0 - 8.3.17, 8.4.1 - 8.4.4
- Fatal error: Declaration of Bar::__construct() must be compatible with Constr::__construct(string $a) in /in/hdDcZ on line 21
Process exited with code 255.
<?php
abstract class Constr {
abstract public function __construct(string $a);
abstract public function method(string $b): void;
}
class Foo extends Constr {
public function __construct(string $a)
{
}
public function method(string $b): void
{
}
}
class Bar extends Constr {
public function __construct()
{
}
public function method(string $b): void
{
}
}
new Foo("a");
new Bar();