1--TEST--
2DateInterval with bad format should not leak period
3--FILE--
4<?php
5
6try {
7    new DateInterval('P3"D');
8} catch (Exception $e) {
9    echo $e->getMessage(), "\n";
10}
11
12try {
13    new DatePeriod('P3"D');
14} catch (Exception $e) {
15    echo $e->getMessage(), "\n";
16}
17
18try {
19    new DatePeriod('2008-03-01T12:00:00Z1');
20} catch (Exception $e) {
21    echo $e->getMessage(), "\n";
22}
23
24?>
25--EXPECT--
26DateInterval::__construct(): Unknown or bad format (P3"D)
27DatePeriod::__construct(): Unknown or bad format (P3"D)
28DatePeriod::__construct(): Unknown or bad format (2008-03-01T12:00:00Z1)
29