PATH:
opt
/
alt
/
tests
/
alt-php54-pecl-igbinary_2.0.8-1.el8
/
tests
--TEST-- Works when there are hash collisions in strings when serializing. --SKIPIF-- <?php if(!extension_loaded('igbinary')) { echo "skip no igbinary"; } ?> --FILE-- <?php class Fy{ public $EzFy = 2; public function __construct($x) { $this->x = $x; } } class Ez { public $FyEz = 'EzEz'; } class G8 { public $FyG8; } $data = array(new Fy('G8G8'), new Fy('EzG8'), new Ez(), new G8(), new Ez(), 'G8' => new G8(), 'F8Ez' => new G8(), array(new G8())); var_dump($data); echo "\n"; $str = igbinary_serialize($data); echo bin2hex($str) . "\n"; $unserialized = igbinary_unserialize($str); var_dump($unserialized); echo "\n"; var_export(serialize($data) === serialize($unserialized)); ?> --EXPECT-- array(8) { [0]=> object(Fy)#1 (2) { ["EzFy"]=> int(2) ["x"]=> string(4) "G8G8" } [1]=> object(Fy)#2 (2) { ["EzFy"]=> int(2) ["x"]=> string(4) "EzG8" } [2]=> object(Ez)#3 (1) { ["FyEz"]=> string(4) "EzEz" } [3]=> object(G8)#4 (1) { ["FyG8"]=> NULL } [4]=> object(Ez)#5 (1) { ["FyEz"]=> string(4) "EzEz" } ["G8"]=> object(G8)#6 (1) { ["FyG8"]=> NULL } ["F8Ez"]=> object(G8)#7 (1) { ["FyG8"]=> NULL } [5]=> array(1) { [0]=> object(G8)#8 (1) { ["FyG8"]=> NULL } } } 00000002140806001702467914021104457a4679060211017811044738473806011a0014020e0106020e021104457a473806021702457a140111044679457a1104457a457a06031702473814011104467947380006041a0514010e060e070e081a0814010e090011044638457a1a0814010e09000605140106001a0814010e0900 array(8) { [0]=> object(Fy)#9 (2) { ["EzFy"]=> int(2) ["x"]=> string(4) "G8G8" } [1]=> object(Fy)#10 (2) { ["EzFy"]=> int(2) ["x"]=> string(4) "EzG8" } [2]=> object(Ez)#11 (1) { ["FyEz"]=> string(4) "EzEz" } [3]=> object(G8)#12 (1) { ["FyG8"]=> NULL } [4]=> object(Ez)#13 (1) { ["FyEz"]=> string(4) "EzEz" } ["G8"]=> object(G8)#14 (1) { ["FyG8"]=> NULL } ["F8Ez"]=> object(G8)#15 (1) { ["FyG8"]=> NULL } [5]=> array(1) { [0]=> object(G8)#16 (1) { ["FyG8"]=> NULL } } } true
[-] igbinary_015c.phpt
[edit]
[-] igbinary_043.phpt
[edit]
[-] igbinary_057.phpt
[edit]
[-] igbinary_bug72134.phpt
[edit]
[-] igbinary_045.phpt
[edit]
[-] igbinary_045b.phpt
[edit]
[-] igbinary_063.phpt
[edit]
[-] igbinary_069.phpt
[edit]
[-] igbinary_052.phpt
[edit]
[-] igbinary_004.phpt
[edit]
[-] igbinary_017.phpt
[edit]
[-] igbinary_053.phpt
[edit]
[-] igbinary_032.phpt
[edit]
[-] igbinary_058.phpt
[edit]
[-] igbinary_005.phpt
[edit]
[-] igbinary_046b.phpt
[edit]
[-] igbinary_063_php72.phpt
[edit]
[-] igbinary_064.phpt
[edit]
[-] igbinary_044.phpt
[edit]
[-] igbinary_033.phpt
[edit]
[-] igbinary_040.phpt
[edit]
[-] igbinary_046c.phpt
[edit]
[-] igbinary_049b.phpt
[edit]
[-] igbinary_006.phpt
[edit]
[-] igbinary_054.phpt
[edit]
[-] igbinary_063_php7.phpt
[edit]
[-] igbinary_046d.phpt
[edit]
[-] igbinary_046.phpt
[edit]
[-] igbinary_021.phpt
[edit]
[-] igbinary_034.phpt
[edit]
[-] igbinary_059.phpt
[edit]
[-] igbinary_068.phpt
[edit]
[-] igbinary_029.phpt
[edit]
[-] igbinary_014.phpt
[edit]
[-] igbinary_025.phpt
[edit]
[-] igbinary_016.phpt
[edit]
[-] igbinary_048b.phpt
[edit]
[-] igbinary_024.phpt
[edit]
[-] igbinary_055.phpt
[edit]
[-] igbinary_048.phpt
[edit]
[-] igbinary_009.phpt
[edit]
[-] igbinary_051.phpt
[edit]
[-] igbinary_023.phpt
[edit]
[-] igbinary_012.phpt
[edit]
[-] igbinary_030.phpt
[edit]
[-] igbinary_058b.phpt
[edit]
[-] igbinary_065.phpt
[edit]
[-] igbinary_018.phpt
[edit]
[-] igbinary_015.phpt
[edit]
[-] igbinary_030_php7.phpt
[edit]
[-] igbinary_062.phpt
[edit]
[-] igbinary_042.phpt
[edit]
[-] igbinary_026b.phpt
[edit]
[-] igbinary_002.phpt
[edit]
[-] igbinary_041.phpt
[edit]
[-] igbinary_031.phpt
[edit]
[-] igbinary_027.phpt
[edit]
[-] igbinary_020.phpt
[edit]
[-] igbinary_022.phpt
[edit]
[-] igbinary_030_php72.phpt
[edit]
[-] igbinary_015b.phpt
[edit]
[-] igbinary_007.phpt
[edit]
[-] igbinary_049.phpt
[edit]
[-] igbinary_050.phpt
[edit]
[+]
..
[-] igbinary_013.phpt
[edit]
[-] igbinary_010.phpt
[edit]
[-] igbinary_028.phpt
[edit]
[-] igbinary_045c.phpt
[edit]
[-] igbinary_001.phpt
[edit]
[-] igbinary_003.phpt
[edit]
[-] igbinary_066.phpt
[edit]
[-] igbinary_008.phpt
[edit]
[-] igbinary_009b.phpt
[edit]
[-] igbinary_026.phpt
[edit]
[-] igbinary_047.phpt
[edit]