Download src/php/php-src/ext/date/tests/DateInterval_createFromDateString_broken.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 401 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/date/tests/DateInterval_createFromDateString_broken.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/date/tests/DateInterval_createFromDateString_broken.phpt
-
curl -L -o DateInterval_createFromDateString_broken.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/date/tests/DateInterval_createFromDateString_broken.phpt
401 Bytes
| --TEST-- | |
| Test DateInterval::createFromDateString() function : nonsense data | |
| --FILE-- | |
| 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 | |