1--TEST--
2DateTimeImmutable invalid serialization data
3--FILE--
4<?php
5$propertySets = [
6	[ 'date' => "2023-01-13 12:29:30", 'timezone_type' => 1,   'timezone' => "+02:30"      ],
7	[ 'date' => "2023-01-13 12:29:30", 'timezone_type' => 3,   'timezone' => "Europe/Kyiv" ],
8	[ 'date' => 2023.113,              'timezone_type' => 1,   'timezone' => "+02:30"      ],
9	[ 'date' => 2023.113,              'timezone_type' => 3,   'timezone' => "Europe/Kyiv" ],
10	[ 'date' => "2023-01-13 12:29:30", 'timezone_type' => 1.4, 'timezone' => "+02:30"      ],
11	[ 'date' => "2023-01-13 12:29:30", 'timezone_type' => 3.4, 'timezone' => "Europe/Kyiv" ],
12	[ 'date' => "2023-01-13 12:29:30", 'timezone_type' => 1,   'timezone' => 2.5           ],
13	[ 'date' => "2023-01-13 12:29:30", 'timezone_type' => 3,   'timezone' => 2.5           ],
14	[ 'date' => "2023-01-13 12:29:30", 'timezone_type' => 3,   'timezone' => "Europe/Lviv" ],
15	[ 'date' => "2023-01-13 12:29:30", 'timezone_type' => 4,   'timezone' => "Europe/Kyiv" ],
16];
17
18foreach( $propertySets as $propertySet )
19{
20	try {
21		$d = DateTimeImmutable::__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 DateTimeImmutable object
32Error: Invalid serialization data for DateTimeImmutable object
33Error: Invalid serialization data for DateTimeImmutable object
34Error: Invalid serialization data for DateTimeImmutable object
35Error: Invalid serialization data for DateTimeImmutable object
36Error: Invalid serialization data for DateTimeImmutable object
37Error: Invalid serialization data for DateTimeImmutable object
38Error: Invalid serialization data for DateTimeImmutable object
39