Download src/php/php-src/ext/json/tests/bug46215.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 277 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/json/tests/bug46215.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/json/tests/bug46215.phpt
-
curl -L -o bug46215.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/json/tests/bug46215.phpt
277 Bytes
| --TEST-- | |
| Bug #46215 (json_encode mutates its parameter and has some class-specific state) | |
| --FILE-- | |
| class foo { | |
| protected $a = array(); | |
| } | |
| $a = new foo; | |
| $x = json_encode($a); | |
| print_r($a); | |
| --EXPECT-- | |
| foo Object | |
| ( | |
| [a:protected] => Array | |
| ( | |
| ) | |
| ) | |