1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/Zend/tests/array_unpack/ref1.phpt
2019-05-14 02:59:06 +02:00

18 lines
273 B
PHP

--TEST--
Array unpacking with element rc=1
--FILE--
<?php
$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)
}