source: src/router/php7/ext/intl/tests/bug74230.phpt @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 3 months ago

update php

File size: 442 bytes
Line 
1--TEST--
2Bug #74230 iconv fails to fail on surrogates
3--SKIPIF--
4<?php if(!extension_loaded('iconv')) print 'skip'; ?>
5--FILE--
6<?php
7
8$high = "\xED\xa1\x92"; // codepoint D852
9$low = "\xED\xBD\xA2"; // codepoint DF62
10$pair = $high.$low;
11var_dump(
12    @\iconv('UTF-8', 'UTF-8', $high) === false,
13    @\iconv('UTF-8', 'UTF-8', $low) === false,
14    @\iconv('UTF-8', 'UTF-8', $pair) === false
15);
16
17?>
18--EXPECT--
19bool(true)
20bool(true)
21bool(true)
22
Note: See TracBrowser for help on using the repository browser.