Download src/php/php-src/tests/lang/036.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 388 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/tests/lang/036.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/tests/lang/036.phpt
-
curl -L -o 036.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/tests/lang/036.phpt
388 Bytes
| --TEST-- | |
| Child public element should not override parent private element in parent methods | |
| --FILE-- | |
| class par { | |
| private $id = "foo"; | |
| function displayMe() | |
| { | |
| print $this->id; | |
| } | |
| }; | |
| class chld extends par { | |
| public $id = "bar"; | |
| function displayHim() | |
| { | |
| parent::displayMe(); | |
| } | |
| }; | |
| $obj = new chld(); | |
| $obj->displayHim(); | |
| --EXPECT-- | |
| foo | |