xref: /PHP-8.3/ext/standard/tests/time/bug38524.phpt (revision bed71393)
1--TEST--
2Bug #38524 (strptime() does not initialize the internal date storage structure)
3--SKIPIF--
4<?php
5if (!function_exists('strptime')) echo "SKIP";
6if (str_contains(PHP_OS, 'FreeBSD')) {
7    die("skip strptime() behaves differently on FreeBSD");
8}
9?>
10--FILE--
11<?php
12    var_dump(strptime('2006-08-20', '%Y-%m-%d'));
13?>
14--EXPECTF--
15Deprecated: Function strptime() is deprecated in %s on line %d
16array(9) {
17  ["tm_sec"]=>
18  int(0)
19  ["tm_min"]=>
20  int(0)
21  ["tm_hour"]=>
22  int(0)
23  ["tm_mday"]=>
24  int(20)
25  ["tm_mon"]=>
26  int(7)
27  ["tm_year"]=>
28  int(106)
29  ["tm_wday"]=>
30  int(0)
31  ["tm_yday"]=>
32  int(%d)
33  ["unparsed"]=>
34  string(0) ""
35}
36