Download src/php/php-src/Zend/tests/dynamic_call/bug78898.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 633 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/dynamic_call/bug78898.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/dynamic_call/bug78898.phpt
-
curl -L -o bug78898.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/dynamic_call/bug78898.phpt
633 Bytes
| --TEST-- | |
| Bug #78898: call_user_func(['parent', ...]) fails while other succeed | |
| --FILE-- | |
| class A | |
| { | |
| protected function _x() | |
| { | |
| echo "a"; | |
| } | |
| public function __call($methodName, array $arguments) | |
| { | |
| throw new Exception("Unknown method."); | |
| } | |
| } | |
| class B extends A | |
| { | |
| public function x() | |
| { | |
| parent::_x(); | |
| call_user_func('parent::_x'); | |
| call_user_func(['parent', '_x']); | |
| } | |
| } | |
| $b = new B; | |
| $b->x(); | |
| --EXPECTF-- | |
| a | |
| Deprecated: Use of "parent" in callables is deprecated in %s on line %d | |
| a | |
| Deprecated: Use of "parent" in callables is deprecated in %s on line %d | |
| a | |