0
0
mirror of https://github.com/php/php-src.git synced 2024-12-18 14:30:35 +08:00
php-src/Zend/tests/bug61970_2.phpt
2020-08-09 22:03:36 +02:00

20 lines
463 B
PHP

--TEST--
Bug #61970 (Restraining __construct() access level in subclass gives a fatal error - stays when inheriting implemented abstract)
--FILE--
<?php
abstract class Foo {
abstract public function __construct();
}
class Bar extends Foo {
public function __construct(){}
}
class Baz extends Bar {
protected function __construct(){}
}
?>
--EXPECTF--
Fatal error: Access level to Baz::__construct() must be public (as in class Foo) in %s on line 12