Download src/php/php-src/tests/lang/037.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 350 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/tests/lang/037.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/tests/lang/037.phpt
-
curl -L -o 037.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/tests/lang/037.phpt
350 Bytes
| --TEST-- | |
| 'Static' binding for private variables | |
| --FILE-- | |
| class par { | |
| private $id="foo"; | |
| function displayMe() | |
| { | |
| $this->displayChild(); | |
| } | |
| }; | |
| class chld extends par { | |
| private $id = "bar"; | |
| function displayChild() | |
| { | |
| print $this->id; | |
| } | |
| }; | |
| $obj = new chld(); | |
| $obj->displayMe(); | |
| --EXPECT-- | |
| bar | |