1--TEST--
2Test DateInterval::__unserialize OSS fuzz issues
3--FILE--
4<?php
5$files = [
6	'ossfuzz-55589.txt',
7	'ossfuzz-55599.txt',
8	'ossfuzz-55727.txt',
9	'ossfuzz-56931.txt',
10];
11
12foreach ($files as $file) {
13	echo "{$file}: ";
14
15	$s = file_get_contents(__DIR__ . "/{$file}");
16
17	try {
18		$x = unserialize(substr($s, strpos($s, "|") + 1));
19	} catch (Error $e) {
20		echo get_class($e), ': ', $e->getMessage(), "\n";
21	}
22	var_dump($x);
23	echo "\n\n";
24}
25?>
26--EXPECTF--
27ossfuzz-55589.txt:
28%s: unserialize(): Error at offset 39 of 39 bytes in %sunserialize-test.php on line %d
29bool(false)
30
31
32ossfuzz-55599.txt:
33%s: unserialize(): Error at offset 26 of 26 bytes in %sunserialize-test.php on line %d
34Error: Invalid serialization data for DateTime object
35bool(false)
36
37
38ossfuzz-55727.txt:
39%s: unserialize(): Error at offset 230 of 509 bytes in %sunserialize-test.php on line %d
40bool(false)
41
42
43ossfuzz-56931.txt:
44%s: unserialize(): Error at offset 39 of 39 bytes in %sunserialize-test.php on line %d
45
46Deprecated: Creation of dynamic property DateInterval::$ is deprecated in %s on line %d
47bool(false)
48