1--TEST--
2Transliterator::createInverse (basic)
3--SKIPIF--
4<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
5--FILE--
6<?php
7
8ini_set("intl.error_level", E_WARNING);
9
10$tr = Transliterator::create("Katakana-Latin");
11$orstr = "オーシャンビュー";
12$new_str = $tr->transliterate($orstr);
13
14$revtr = $tr->createInverse();
15$recovstr = $revtr->transliterate($new_str);
16
17$revtr2 = transliterator_create_inverse($tr);
18$recovstr2 = $revtr2->transliterate($new_str);
19
20echo $orstr,"\n";
21echo $new_str,"\n";
22echo $recovstr,"\n";
23
24var_dump(($orstr == $recovstr) == $recovstr2);
25
26echo "Done.\n";
27--EXPECT--
28オーシャンビュー
29ōshanbyū
30オーシャンビュー
31bool(true)
32Done.
33