Download src/php/php-src/Zend/tests/array_unpack/ref1.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 276 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/array_unpack/ref1.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/array_unpack/ref1.phpt
-
curl -L -o ref1.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/array_unpack/ref1.phpt
276 Bytes
| --TEST-- | |
| Array unpacking with element rc=1 | |
| --FILE-- | |
| $a = 1; | |
| $b = [&$a]; //array (0 => (refcount=2, is_ref=1)=1) | |
| unset($a); //array (0 => (refcount=1, is_ref=1)=1) | |
| var_dump([...$b]); //array (0 => (refcount=0, is_ref=0)=1) | |
| --EXPECT-- | |
| array(1) { | |
| [0]=> | |
| int(1) | |
| } | |