mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
- Added test
This commit is contained in:
parent
844ae2f336
commit
9472026f12
31
Zend/tests/bug47801.phpt
Normal file
31
Zend/tests/bug47801.phpt
Normal file
@ -0,0 +1,31 @@
|
||||
--TEST--
|
||||
Bug #47801 (__call() accessed via parent:: operator is provided incorrect method name)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A
|
||||
{
|
||||
function __call($name, $args)
|
||||
{
|
||||
echo("magic method called: $name\n");
|
||||
}
|
||||
}
|
||||
|
||||
class B extends A
|
||||
{
|
||||
function getFoo()
|
||||
{
|
||||
parent::getFoo();
|
||||
}
|
||||
}
|
||||
|
||||
$a = new A();
|
||||
$a->getFoo();
|
||||
|
||||
$b = new B();
|
||||
$b->getFoo();
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
magic method called: getFoo
|
||||
magic method called: getFoo
|
Loading…
Reference in New Issue
Block a user