Download src/php/php-src/Zend/tests/asymmetric_visibility/nested_write.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 306 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/asymmetric_visibility/nested_write.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/asymmetric_visibility/nested_write.phpt
-
curl -L -o nested_write.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/asymmetric_visibility/nested_write.phpt
306 Bytes
| --TEST-- | |
| Asymmetric visibility nested write | |
| --FILE-- | |
| class Foo { | |
| public private(set) Bar $bar; | |
| public function __construct() { | |
| $this->bar = new Bar; | |
| } | |
| } | |
| class Bar { | |
| public int $baz; | |
| } | |
| $foo = new Foo(); | |
| $foo->bar->baz = 42; | |
| var_dump($foo->bar->baz); | |
| --EXPECT-- | |
| int(42) | |