xref: /PHP-8.0/ext/date/tests/bug65184.phpt (revision f8d79582)
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--EXPECT--
2590 85 97 6a 93 fa
266
27