Download src/php/php-src/Zend/tests/dynamic_call/bug69124.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 354 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/dynamic_call/bug69124.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/dynamic_call/bug69124.phpt
-
curl -L -o bug69124.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/dynamic_call/bug69124.phpt
354 Bytes
| --TEST-- | |
| Bug 69124: Method name must be as string (invalid error message when using reference to a string) | |
| --FILE-- | |
| class Foo { | |
| public function bar() { | |
| print "Success\n"; | |
| } | |
| } | |
| function test(&$instance, &$method) { | |
| $instance->{$method}(); | |
| } | |
| $instance = new Foo; | |
| $method = "bar"; | |
| test($instance, $method); | |
| --EXPECT-- | |
| Success | |