Download src/php/php-src/Zend/tests/closures/closure_031.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 371 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/closures/closure_031.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/closures/closure_031.phpt
-
curl -L -o closure_031.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/closures/closure_031.phpt
371 Bytes
| --TEST-- | |
| Closure 031: Closure properties with custom error handlers | |
| --FILE-- | |
| function foo($errno, $errstr, $errfile, $errline) { | |
| echo "Warning: $errstr\n"; | |
| } | |
| set_error_handler('foo'); | |
| $foo = function() { | |
| }; | |
| try { | |
| var_dump($foo->a); | |
| } catch (Error $ex) { | |
| echo "Error: {$ex->getMessage()}\n"; | |
| } | |
| --EXPECT-- | |
| Warning: Undefined property: Closure::$a | |
| NULL | |