Download src/php/php-src/Zend/tests/exceptions/exception_015.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 499 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/exceptions/exception_015.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/exceptions/exception_015.phpt
-
curl -L -o exception_015.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/exceptions/exception_015.phpt
499 Bytes
| --TEST-- | |
| Exceptions on improper access to string | |
| --FILE-- | |
| $s = "ABC"; | |
| try { | |
| $s[] = "D"; | |
| } catch (Error $e) { | |
| echo "\nException: " . $e->getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n"; | |
| } | |
| $s[] = "D"; | |
| --EXPECTF-- | |
| Exception: [] operator not supported for strings in %sexception_015.php on line %d | |
| Fatal error: Uncaught Error: [] operator not supported for strings in %sexception_015.php:%d | |
| Stack trace: | |
| #0 {main} | |
| thrown in %sexception_015.php on line %d | |