1--TEST-- 2DateTime invalid serialization data (wakeup) 3--FILE-- 4<?php 5$propertySets = [ 6 'O:8:"DateTime":3:{s:4:"date";s:26:"2023-01-13 14:48:01.705516";s:13:"timezone_type";i:3;s:8:"timezone";s:13:"Europe/London";}', 7 'O:8:"DateTime":3:{s:4:"date";i:3;s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}', 8 'O:8:"DateTime":3:{s:4:"date";s:26:"2023-01-13 14:48:01.705516";s:13:"timezone_type";s:1:"X";s:8:"timezone";s:3:"UTC";}', 9 'O:8:"DateTime":3:{s:4:"date";s:26:"2023-01-13 14:48:01.705516";s:13:"timezone_type";i:4;s:8:"timezone";s:3:"UTC";}', 10 'O:8:"DateTime":3:{s:4:"date";s:26:"2023-01-13 14:48:01.705516";s:13:"timezone_type";i:3;s:8:"timezone";s:11:"Europe/Lviv";}', 11 'O:8:"DateTime":3:{s:4:"date";s:26:"2023-01-13 14:48:01.705516";s:13:"timezone_type";i:3;s:8:"timezone";s:11:"Europe/Kyiv";}', 12 'O:8:"DateTime":3:{s:4:"date";s:26:"2023-01-13 14:48:01.705516";s:13:"timezone_type";i:3;s:8:"timezone";s:1:"Europe/Kyiv";}', 13]; 14 15foreach( $propertySets as $propertySet ) 16{ 17 try { 18 $d = unserialize($propertySet); 19 echo "OK? ", gettype($d), "\n"; 20 } catch (\Error $e) { 21 echo $e::class, ': ', $e->getMessage(), "\n"; 22 } 23} 24?> 25--EXPECTF-- 26OK? object 27Error: Invalid serialization data for DateTime object 28Error: Invalid serialization data for DateTime object 29Error: Invalid serialization data for DateTime object 30Error: Invalid serialization data for DateTime object 31OK? object 32 33Warning: unserialize(): Error at offset 109 of 122 bytes in %sDateTime_wakeup_exception.php on line 15 34OK? boolean 35