xref: /PHP-7.2/ext/date/tests/bug65184.phpt (revision a2b1546f)
1--TEST--
2Test bug #65184 strftime() returns insufficient-length string under multibyte locales
3--SKIPIF--
4<?php
5if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
6    die("skip Test is valid for Windows");
7}
8?>
9--INI--
10date.timezone = UTC
11--FILE--
12<?php
13	setlocale(LC_ALL, 'Japanese_Japan.932');
14	/* timestamp has to be some wednesday */
15	$s = strftime('%A', 1372884126);
16
17	for ($i = 0; $i < strlen($s); $i++) {
18		printf("%x ", ord($s[$i]));
19	}
20	echo "\n";
21
22	echo strlen(strftime('%A')), "\n";
23?>
24===DONE===
25--EXPECT--
2690 85 97 6a 93 fa
276
28===DONE===
29