xref: /PHP-7.2/ext/date/tests/bug51994.phpt (revision 4c9fad8b)
1--TEST--
2Bug #51994 (date_parse_from_format is parsing invalid date using 'yz' format)
3--FILE--
4<?php
5$trans_date = '10153'; // 152nd day of year 2010 -> 03.06.2010
6$a_date	= date_parse_from_format('yz', $trans_date);
7var_dump($a_date);
8?>
9--EXPECTF--
10array(12) {
11  ["year"]=>
12  int(2010)
13  ["month"]=>
14  int(6)
15  ["day"]=>
16  int(3)
17  ["hour"]=>
18  bool(false)
19  ["minute"]=>
20  bool(false)
21  ["second"]=>
22  bool(false)
23  ["fraction"]=>
24  bool(false)
25  ["warning_count"]=>
26  int(0)
27  ["warnings"]=>
28  array(0) {
29  }
30  ["error_count"]=>
31  int(0)
32  ["errors"]=>
33  array(0) {
34  }
35  ["is_localtime"]=>
36  bool(false)
37}
38