php-src/ext/intl/tests/transliterator_create_inverse_basic.phpt
Gina Peter Banyard c42e6d62d8
ext/intl: modernize tests (#19392)
This is effectively removing ZPP tests, enabling warnings, and moving INI settings into the INI PHPT block
2025-08-06 23:33:48 +01:00

33 lines
624 B
PHP

--TEST--
Transliterator::createInverse (basic)
--EXTENSIONS--
intl
--FILE--
<?php
$tr = Transliterator::create("Katakana-Latin");
$orstr = "オーシャンビュー";
$new_str = $tr->transliterate($orstr);
$revtr = $tr->createInverse();
$recovstr = $revtr->transliterate($new_str);
$revtr2 = transliterator_create_inverse($tr);
$recovstr2 = $revtr2->transliterate($new_str);
echo $orstr,"\n";
echo $new_str,"\n";
echo $recovstr,"\n";
var_dump($orstr === $recovstr);
var_dump($orstr === $recovstr2);
echo "Done.\n";
?>
--EXPECT--
オーシャンビュー
ōshanbyū
オーシャンビュー
bool(true)
bool(true)
Done.