mirror of
https://github.com/php/php-src.git
synced 2024-12-19 15:00:15 +08:00
ded3d984c6
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
37 lines
478 B
PHP
37 lines
478 B
PHP
--TEST--
|
|
Bug #48215 - parent::method() calls __construct
|
|
--FILE--
|
|
<?php
|
|
class A
|
|
{
|
|
public function __construct() {
|
|
echo __METHOD__ . "\n";
|
|
}
|
|
protected function A()
|
|
{
|
|
echo __METHOD__ . "\n";
|
|
}
|
|
}
|
|
class B extends A
|
|
{
|
|
public function __construct() {
|
|
echo __METHOD__ . "\n";
|
|
parent::__construct();
|
|
}
|
|
public function A()
|
|
{
|
|
echo __METHOD__ . "\n";
|
|
parent::A();
|
|
}
|
|
}
|
|
$b = new B();
|
|
$b->A();
|
|
?>
|
|
===DONE===
|
|
--EXPECT--
|
|
B::__construct
|
|
A::__construct
|
|
B::A
|
|
A::A
|
|
===DONE===
|