xref: /PHP-8.2/ext/com_dotnet/tests/bug63208.phpt (revision 56f90492)
1--TEST--
2Bug #63208 (BSTR to PHP string conversion not binary safe)
3--EXTENSIONS--
4com_dotnet
5--FILE--
6<?php
7$string = "\u{0905}b\0cd";
8$variant = new VARIANT($string, VT_ARRAY | VT_UI1, CP_UTF8); // Array of bytes
9$converted = (string) $variant;
10var_dump(bin2hex($string));
11var_dump(bin2hex($converted));
12?>
13--EXPECT--
14string(14) "e0a48562006364"
15string(14) "e0a48562006364"
16