1--TEST--
2DateInterval constructor exceptions
3--INI--
4date.timezone=Europe/London
5--FILE--
6<?php
7function check(callable $c)
8{
9	try {
10		var_dump($c());
11	} catch (\DateMalformedIntervalStringException $e) {
12		echo $e::class, ': ', $e->getMessage(), "\n";
13	}
14}
15
16check(fn() => new DateInterval(""));
17check(fn() => new DateInterval("2007-05-11T15:30:00Z/"));
18?>
19--EXPECTF--
20DateMalformedIntervalStringException: Unknown or bad format ()
21DateMalformedIntervalStringException: Failed to parse interval (2007-05-11T15:30:00Z/)
22