xref: /PHP-8.0/Zend/tests/bug47801.phpt (revision 9472026f)
1--TEST--
2Bug #47801 (__call() accessed via parent:: operator is provided incorrect method name)
3--FILE--
4<?php
5
6class A
7{
8  function __call($name, $args)
9  {
10    echo("magic method called: $name\n");
11  }
12}
13
14class B extends A
15{
16  function getFoo()
17  {
18    parent::getFoo();
19  }
20}
21
22$a = new A();
23$a->getFoo();
24
25$b = new B();
26$b->getFoo();
27
28?>
29--EXPECT--
30magic method called: getFoo
31magic method called: getFoo
32