1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
--TEST--
UConverter::transcode issue with substitutes values as references
--EXTENSIONS--
intl
--FILE--
<?php
$subst = '??';
$opts = array('from_subst' => '?', 'to_subst' => &$subst);
var_dump(UConverter::transcode("This is an ascii string", 'ascii', 'utf-8', $opts));
$opts = array('from_subst' => &$subst, 'to_subst' => '?');
var_dump(UConverter::transcode("This is an ascii string", 'ascii', 'utf-8', $opts));
// should yield the same results
$opts = array('from_subst' => '?', 'to_subst' => '??');
var_dump(UConverter::transcode("This is an ascii string", 'ascii', 'utf-8', $opts));
$opts = array('from_subst' => '??', 'to_subst' => '?');
var_dump(UConverter::transcode("This is an ascii string", 'ascii', 'utf-8', $opts));
?>
--EXPECT--
bool(false)
string(23) "This is an ascii string"
bool(false)
string(23) "This is an ascii string"
|