���� JFIF �� � ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /usr/share/tests/pecl/igbinary/tests/ |
--TEST-- __serialize() mechanism (006): DateTime --SKIPIF-- <?php if (PHP_VERSION_ID < 70400) { echo "skip __serialize/__unserialize not supported in php < 7.4 for compatibility with serialize()"; } ?> --FILE-- <?php $dt = new DateTime('2019-12-08 12:34', new DateTimeZone('UTC')); var_dump(bin2hex($s = igbinary_serialize($dt))); var_dump(igbinary_unserialize($s)); $dt = new DateTime('2019-12-08 12:34', new DateTimeZone('Pacific/Nauru')); var_dump(bin2hex($s = igbinary_serialize($dt))); var_dump(igbinary_unserialize($s)); ?> --EXPECT-- string(164) "0000000217084461746554696d651403110464617465111a323031392d31322d30382031323a33343a30302e303030303030110d74696d657a6f6e655f747970650603110874696d657a6f6e651103555443" object(DateTime)#2 (3) { ["date"]=> string(26) "2019-12-08 12:34:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } string(184) "0000000217084461746554696d651403110464617465111a323031392d31322d30382031323a33343a30302e303030303030110d74696d657a6f6e655f747970650603110874696d657a6f6e65110d506163696669632f4e61757275" object(DateTime)#1 (3) { ["date"]=> string(26) "2019-12-08 12:34:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(13) "Pacific/Nauru" }