PATH:
opt
/
alt
/
tests
/
alt-php51-pecl-igbinary_1.2.1-1.el8
/
tests
--TEST-- Check for reference serialisation --INI-- report_memleaks=0 --SKIPIF-- <?php if(!extension_loaded('igbinary')) { echo "skip no igbinary"; } --FILE-- <?php function test($type, $variable, $test = true) { $serialized = igbinary_serialize($variable); $unserialized = igbinary_unserialize($serialized); echo $type, "\n"; echo substr(bin2hex($serialized), 8), "\n"; echo !$test || $unserialized == $variable ? 'OK' : 'ERROR', "\n"; $dump_exp = print_r($variable, true); $dump_act = print_r($unserialized, true); if ($dump_act !== $dump_exp) { echo "But var dump differs:\n", $dump_act, "\n", $dump_exp, "\n"; } } $a = array('foo'); test('array($a, $a)', array($a, $a), true); test('array(&$a, &$a)', array(&$a, &$a), true); $a = array(null); $b = array(&$a); $a[0] = &$b; test('cyclic $a = array(&array(&$a))', $a, false); --EXPECT-- array($a, $a) 14020600140106001103666f6f06010101 OK array(&$a, &$a) 1402060025140106001103666f6f0601250101 OK cyclic $a = array(&array(&$a)) 1401060025140106002514010600250101 OK
[-] igbinary_043.phpt
[edit]
[-] igbinary_045.phpt
[edit]
[-] igbinary_045b.phpt
[edit]
[-] igbinary_004.phpt
[edit]
[-] igbinary_bug54662.phpt
[edit]
[-] igbinary_017.phpt
[edit]
[-] igbinary_032.phpt
[edit]
[-] igbinary_005.phpt
[edit]
[-] igbinary_044.phpt
[edit]
[-] igbinary_033.phpt
[edit]
[-] igbinary_040.phpt
[edit]
[-] igbinary_006.phpt
[edit]
[-] igbinary_046.phpt
[edit]
[-] igbinary_021.phpt
[edit]
[-] igbinary_034.phpt
[edit]
[-] igbinary_029.phpt
[edit]
[-] igbinary_014.phpt
[edit]
[-] igbinary_025.phpt
[edit]
[-] igbinary_016.phpt
[edit]
[-] igbinary_024.phpt
[edit]
[-] igbinary_009.phpt
[edit]
[-] igbinary_023.phpt
[edit]
[-] igbinary_012.phpt
[edit]
[-] igbinary_030.phpt
[edit]
[-] igbinary_018.phpt
[edit]
[-] igbinary_015.phpt
[edit]
[-] igbinary_042.phpt
[edit]
[-] igbinary_026b.phpt
[edit]
[-] igbinary_002.phpt
[edit]
[-] igbinary_031.phpt
[edit]
[-] igbinary_027.phpt
[edit]
[-] igbinary_020.phpt
[edit]
[-] igbinary_022.phpt
[edit]
[-] igbinary_015b.phpt
[edit]
[-] igbinary_007.phpt
[edit]
[+]
..
[-] igbinary_013.phpt
[edit]
[-] igbinary_010.phpt
[edit]
[-] igbinary_028.phpt
[edit]
[-] igbinary_001.phpt
[edit]
[-] igbinary_003.phpt
[edit]
[-] igbinary_008.phpt
[edit]
[-] igbinary_026.phpt
[edit]
[-] igbinary_047.phpt
[edit]