Download src/php/php-src/Zend/tests/closures/closure_015.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 388 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/closures/closure_015.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/closures/closure_015.phpt
-
curl -L -o closure_015.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/closures/closure_015.phpt
388 Bytes
| --TEST-- | |
| Closure 015: converting to string/unicode | |
| --FILE-- | |
| $x = function() { return 1; }; | |
| try { | |
| print (string) $x; | |
| } catch (Error $e) { | |
| echo $e->getMessage(), "\n"; | |
| } | |
| try { | |
| print $x; | |
| } catch (Error $e) { | |
| echo $e->getMessage(), "\n"; | |
| } | |
| --EXPECT-- | |
| Object of class Closure could not be converted to string | |
| Object of class Closure could not be converted to string | |