1--TEST-- 2DateTimeZone invalid serialization data 3--FILE-- 4<?php 5$propertySets = [ 6 [ 'timezone_type' => 1, 'timezone' => "+02:30" ], 7 [ 'timezone_type' => 3, 'timezone' => "Europe/Kyiv" ], 8 [ 'timezone_type' => 1.4, 'timezone' => "+02:30" ], 9 [ 'timezone_type' => 3.4, 'timezone' => "Europe/Kyiv" ], 10 [ 'timezone_type' => 1, 'timezone' => 2.5 ], 11 [ 'timezone_type' => 3, 'timezone' => 2.5 ], 12 [ 'timezone_type' => 3, 'timezone' => "Europe/K\0v" ], 13 [ 'timezone_type' => 3, 'timezone' => "99:99:99" ], 14 [ 'timezone_type' => 3, 'timezone' => "Europe/Lviv" ], 15 [ 'timezone_type' => 4, 'timezone' => "Europe/Kyiv" ], 16]; 17 18foreach( $propertySets as $propertySet ) 19{ 20 try { 21 $d = DateTimeZone::__set_state( $propertySet ); 22 echo "OK\n"; 23 } catch (\Error $e) { 24 echo $e::class, ': ', $e->getMessage(), "\n"; 25 } 26} 27?> 28--EXPECT-- 29OK 30OK 31Error: Invalid serialization data for DateTimeZone object 32Error: Invalid serialization data for DateTimeZone object 33Error: Invalid serialization data for DateTimeZone object 34Error: Invalid serialization data for DateTimeZone object 35Error: Invalid serialization data for DateTimeZone object 36Error: Invalid serialization data for DateTimeZone object 37Error: Invalid serialization data for DateTimeZone object 38Error: Invalid serialization data for DateTimeZone object 39