php-src/Zend/tests/bug48215.phpt
2020-02-03 22:52:20 +01:00

35 lines
522 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();
?>
--EXPECT--
B::__construct
A::__construct
B::A
A::A