1--TEST--
2GH-8458 (DateInterval::createFromDateString does not warn when non-relative items are present)
3--FILE--
4<?php
5$formats = [
6	'next weekday 15:30',
7	'+5 hours noon',
8	'-8 days March 23',
9	'+72 seconds UTC',
10];
11
12foreach ($formats as $format) {
13	$d = DateInterval::createFromDateString($format);
14}
15
16foreach ($formats as $format) {
17	$d = date_interval_create_from_date_string($format);
18}
19
20?>
21--EXPECTF--
22Warning: DateInterval::createFromDateString(): String 'next weekday 15:30' contains non-relative elements in %sdate_interval_non_relative_warning.php on line %d
23
24Warning: DateInterval::createFromDateString(): String '+5 hours noon' contains non-relative elements in %sdate_interval_non_relative_warning.php on line %d
25
26Warning: DateInterval::createFromDateString(): String '-8 days March 23' contains non-relative elements in %sdate_interval_non_relative_warning.php on line %d
27
28Warning: DateInterval::createFromDateString(): String '+72 seconds UTC' contains non-relative elements in %sdate_interval_non_relative_warning.php on line %d
29
30Warning: date_interval_create_from_date_string(): String 'next weekday 15:30' contains non-relative elements in %sdate_interval_non_relative_warning.php on line %d
31
32Warning: date_interval_create_from_date_string(): String '+5 hours noon' contains non-relative elements in %sdate_interval_non_relative_warning.php on line %d
33
34Warning: date_interval_create_from_date_string(): String '-8 days March 23' contains non-relative elements in %sdate_interval_non_relative_warning.php on line %d
35
36Warning: date_interval_create_from_date_string(): String '+72 seconds UTC' contains non-relative elements in %sdate_interval_non_relative_warning.php on line %d
37