1
0
mirror of https://github.com/php/php-src.git synced 2026-04-18 13:31:27 +02:00
Files
archived-php-src/ext/standard/tests/serialize/counting_of_references.phpt
2014-09-24 12:06:19 +02:00

15 lines
216 B
PHP

--TEST--
References are not counted twice
--FILE--
<?php
$ref1 = 1;
$ref2 = 2;
$arr = [&$ref1, &$ref1, &$ref2, &$ref2];
var_dump(serialize($arr));
?>
--EXPECT--
string(38) "a:4:{i:0;i:1;i:1;R:2;i:2;i:2;i:3;R:3;}"