Download src/php/php-src/Zend/tests/constexpr/gh7771_3.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 436 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/constexpr/gh7771_3.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/constexpr/gh7771_3.phpt
-
curl -L -o gh7771_3.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/constexpr/gh7771_3.phpt
436 Bytes
| --TEST-- | |
| GH-7771.3 (Incorrect file/line for class constant expression exceptions) | |
| --FILE-- | |
| $classlist = [ | |
| 'space1\C' => 'class y{const y="$y";}', | |
| 'D' => 'class D{const HW=space1\C::y;}' | |
| ]; | |
| spl_autoload_register(function($class) use ($classlist) { | |
| eval($classlist[$class]); | |
| }); | |
| var_dump(D::HW); | |
| --EXPECTF-- | |
| Fatal error: Constant expression contains invalid operations in %sgh7771_3.php(7) : eval()'d code on line 1 | |