xref: /PHP-8.2/ext/date/tests/bug54283.phpt (revision 2f1d0f2b)
1--TEST--
2Bug #54283 (new DatePeriod(NULL) causes crash)
3--FILE--
4<?php
5
6try {
7    var_dump(new DatePeriod(NULL));
8} catch (Exception $e) {
9    var_dump($e->getMessage());
10}
11
12?>
13--EXPECTF--
14Deprecated: DatePeriod::__construct(): Passing null to parameter #1 ($start) of type string is deprecated in %s on line %d
15string(24) "Unknown or bad format ()"
16