xref: /PHP-8.2/ext/date/tests/005.phpt (revision 95f4ee38)
1--TEST--
2idate() and invalid params
3--FILE--
4<?php
5date_default_timezone_set('UTC');
6
7$t = mktime(0,0,0, 6, 27, 2006);
8
9var_dump(idate(1,1));
10var_dump(idate(""));
11var_dump(idate(0));
12var_dump(idate("B", $t));
13var_dump(idate("[", $t));
14var_dump(idate("'"));
15
16echo "Done\n";
17?>
18--EXPECTF--
19Warning: idate(): Unrecognized date format token in %s on line %d
20bool(false)
21
22Warning: idate(): idate format is one char in %s on line %d
23bool(false)
24
25Warning: idate(): Unrecognized date format token in %s on line %d
26bool(false)
27int(41)
28
29Warning: idate(): Unrecognized date format token in %s on line %d
30bool(false)
31
32Warning: idate(): Unrecognized date format token in %s on line %d
33bool(false)
34Done
35