Download src/php/php-src/tests/classes/abstract_user_call.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 619 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/tests/classes/abstract_user_call.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/tests/classes/abstract_user_call.phpt
-
curl -L -o abstract_user_call.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/tests/classes/abstract_user_call.phpt
619 Bytes
| --TEST-- | |
| ZE2 An abstract method cannot be called indirectly | |
| --FILE-- | |
| abstract class test_base | |
| { | |
| abstract function func(); | |
| } | |
| class test extends test_base | |
| { | |
| function func() | |
| { | |
| echo __METHOD__ . "()\n"; | |
| } | |
| } | |
| $o = new test; | |
| $o->func(); | |
| try { | |
| call_user_func(array($o, 'test_base::func')); | |
| } catch (TypeError $e) { | |
| echo $e->getMessage(), "\n"; | |
| } | |
| --EXPECTF-- | |
| test::func() | |
| Deprecated: Callables of the form ["test", "test_base::func"] are deprecated in %s on line %d | |
| call_user_func(): Argument #1 ($callback) must be a valid callback, cannot call abstract method test_base::func() | |