xref: /PHP-8.0/ext/date/tests/bug67251.phpt (revision 7aacc705)
1--TEST--
2Bug #67251 (date_parse_from_format out-of-bounds read)
3--INI--
4date.timezone=Europe/Berlin
5--FILE--
6<?php
7var_dump(date_parse_from_format("\\","AAAABBBB"));
8?>
9--EXPECT--
10array(12) {
11  ["year"]=>
12  bool(false)
13  ["month"]=>
14  bool(false)
15  ["day"]=>
16  bool(false)
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(2)
32  ["errors"]=>
33  array(1) {
34    [0]=>
35    string(13) "Trailing data"
36  }
37  ["is_localtime"]=>
38  bool(false)
39}
40