mirror of
https://github.com/php/php-src.git
synced 2026-03-24 16:22:37 +01:00
13 lines
401 B
PHP
13 lines
401 B
PHP
--TEST--
|
|
Test DateInterval::createFromDateString() function : nonsense data
|
|
--FILE--
|
|
<?php
|
|
try {
|
|
$i = DateInterval::createFromDateString("foobar");
|
|
} catch (DateMalformedIntervalStringException $e) {
|
|
echo $e::class, ': ', $e->getMessage(), "\n";
|
|
}
|
|
?>
|
|
--EXPECTF--
|
|
DateMalformedIntervalStringException: Unknown or bad format (foobar) at position 0 (f): The timezone could not be found in the database
|