1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/ext/date/tests/DateInterval_createFromDateString_broken.phpt
2023-02-08 10:27:33 +00:00

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