Download src/php/php-src/Zend/tests/constants/bug45910_2.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 406 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/constants/bug45910_2.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/constants/bug45910_2.phpt
-
curl -L -o bug45910_2.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/constants/bug45910_2.phpt
406 Bytes
| --TEST-- | |
| Bug #45910.2 (Cannot declare self-referencing constant) | |
| --FILE-- | |
| class foo { | |
| const AAA = 'x'; | |
| const BBB = 'a'; | |
| const CCC = 'a'; | |
| const DDD = self::AAA; | |
| private static $foo = array( | |
| self::BBB => 'a', | |
| self::CCC => 'b', | |
| self::DDD => 11 | |
| ); | |
| public static function test() { | |
| self::$foo; | |
| } | |
| } | |
| foo::test(); | |
| print 1; | |
| --EXPECT-- | |
| 1 | |