Download src/php/php-src/Zend/tests/constants/bug74657.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 473 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/constants/bug74657.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/constants/bug74657.phpt
-
curl -L -o bug74657.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/constants/bug74657.phpt
473 Bytes
| --TEST-- | |
| Bug #74657 (Undefined constants in array properties result in broken properties) | |
| --FILE-- | |
| interface I { | |
| } | |
| class C { | |
| const FOO = I::FOO; | |
| public $options = [self::FOO => "bar"]; | |
| } | |
| try { | |
| var_dump((new C)->options); | |
| } catch (Throwable $e) {} | |
| var_dump((new C)->options); | |
| --EXPECTF-- | |
| Fatal error: Uncaught Error: Undefined constant I::FOO in %s:%d | |
| Stack trace: | |
| #0 %s(%d): [constant expression]() | |
| #1 {main} | |
| thrown in %sbug74657.php on line %d | |