summaryrefslogtreecommitdiff
path: root/ext/mbstring/tests/mb_ord.phpt
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2017-08-03 22:14:00 +0200
committerNikita Popov <nikita.ppv@gmail.com>2017-08-03 22:14:00 +0200
commit41e9ba6333ab58c9fe3eb8bd413cc3e0eca87be1 (patch)
tree2686eda5727a0d2955113d719ac60c69b6f31911 /ext/mbstring/tests/mb_ord.phpt
parentfb9bf5b64b6c09b9d93bbd1dadd64884e0af66f3 (diff)
downloadphp-git-41e9ba6333ab58c9fe3eb8bd413cc3e0eca87be1.tar.gz
Always use Unicode codepoints in mb_ord() and mb_chr()
Previously mb_chr() had two different encoding-dependent behaviors: * For "Unicode-encodings" it took a Unicode codepoint and returned its encoded representation. * Otherwise it returned a big-endian binary encoding of the passed integer. Now the input is always interpreted as a Unicode codepoint. If a big-endian binary encoding is what you want, you don't need mbstring to implement that.
Diffstat (limited to 'ext/mbstring/tests/mb_ord.phpt')
-rw-r--r--ext/mbstring/tests/mb_ord.phpt2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mbstring/tests/mb_ord.phpt b/ext/mbstring/tests/mb_ord.phpt
index e3f5343fd8..4bf0d0c0e4 100644
--- a/ext/mbstring/tests/mb_ord.phpt
+++ b/ext/mbstring/tests/mb_ord.phpt
@@ -7,7 +7,7 @@ mb_ord()
var_dump(
0x20bb7 === mb_ord("\u{20bb7}"),
0x3f === mb_ord("\u{d800}"),
- 0x8fa1ef === mb_ord("\x8f\xa1\xef", "EUC-JP-2004")
+ 0x50aa === mb_ord("\x8f\xa1\xef", "EUC-JP-2004")
);
// Invalid