Download src/php/php-src/Zend/tests/assert/expect_016.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 600 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/assert/expect_016.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/assert/expect_016.phpt
-
curl -L -o expect_016.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/assert/expect_016.phpt
600 Bytes
| --TEST-- | |
| test enable/disable assertions at runtime (assertions not completely disabled) | |
| --INI-- | |
| zend.assertions=0 | |
| --FILE-- | |
| ini_set("zend.assertions", 0); | |
| var_dump(assert(false)); | |
| var_dump(assert(true)); | |
| ini_set("zend.assertions", 1); | |
| try { | |
| var_dump(assert(false)); | |
| } catch (AssertionError $e) { | |
| echo 'assert(): ', $e->getMessage(), ' failed', PHP_EOL; | |
| } | |
| var_dump(assert(true)); | |
| ini_set("zend.assertions", -1); | |
| --EXPECTF-- | |
| bool(true) | |
| bool(true) | |
| assert(): assert(false) failed | |
| bool(true) | |
| Warning: zend.assertions may be completely enabled or disabled only in php.ini in %s on line %d | |