Download src/php/php-src/Zend/tests/fibers/error-reporting.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 570 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/fibers/error-reporting.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/fibers/error-reporting.phpt
-
curl -L -o error-reporting.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/fibers/error-reporting.phpt
570 Bytes
| --TEST-- | |
| Error reporting change reflected inside fiber | |
| --FILE-- | |
| error_reporting(E_ALL & ~E_USER_NOTICE); | |
| $fiber = new Fiber(function (): void { | |
| trigger_error("Notice A", E_USER_NOTICE); // Should be silenced. | |
| Fiber::suspend(); | |
| trigger_error("Warning A", E_USER_WARNING); | |
| }); | |
| $fiber->start(); | |
| trigger_error("Notice B", E_USER_NOTICE); // Should be silenced. | |
| $fiber->resume(); | |
| trigger_error("Warning B", E_USER_WARNING); | |
| --EXPECTF-- | |
| Warning: Warning A in %serror-reporting.php on line %d | |
| Warning: Warning B in %serror-reporting.php on line %d | |