xref: /PHP-5.4/ext/date/tests/bug67251.phpt (revision 3c328f09)
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--EXPECT--
9array(12) {
10  ["year"]=>
11  bool(false)
12  ["month"]=>
13  bool(false)
14  ["day"]=>
15  bool(false)
16  ["hour"]=>
17  bool(false)
18  ["minute"]=>
19  bool(false)
20  ["second"]=>
21  bool(false)
22  ["fraction"]=>
23  bool(false)
24  ["warning_count"]=>
25  int(0)
26  ["warnings"]=>
27  array(0) {
28  }
29  ["error_count"]=>
30  int(2)
31  ["errors"]=>
32  array(1) {
33    [0]=>
34    string(13) "Trailing data"
35  }
36  ["is_localtime"]=>
37  bool(false)
38}
39