Annotation of embedaddon/php/ext/standard/tests/serialize/004.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: serialize()/unserialize() floats in array.
! 3: --INI--
! 4: precision=12
! 5: serialize_precision=100
! 6: --FILE--
! 7: <?php
! 8: error_reporting (E_ALL);
! 9: $a = array(4);
! 10: $str = serialize($a);
! 11: print('Serialized array: '.$str."\n");
! 12: $b = unserialize($str);
! 13: print('Unserialized array: ');
! 14: var_dump($b);
! 15: print("\n");
! 16: $str = serialize(array(4.5));
! 17: print('Serialized array: '.$str."\n");
! 18: $b = unserialize($str);
! 19: print('Unserialized array: ') ;
! 20: var_dump($b);
! 21: ?>
! 22: --EXPECT--
! 23: Serialized array: a:1:{i:0;i:4;}
! 24: Unserialized array: array(1) {
! 25: [0]=>
! 26: int(4)
! 27: }
! 28:
! 29: Serialized array: a:1:{i:0;d:4.5;}
! 30: Unserialized array: array(1) {
! 31: [0]=>
! 32: float(4.5)
! 33: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>