1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 09:12:14 +01:00
Files
archived-php-src/ext/mbstring/tests/bug26639.phpt
Nikita Popov 39131219e8 Migrate more SKIPIF -> EXTENSIONS (#7139)
This is a mix of more automated and manual migration. It should remove all applicable extension_loaded() checks outside of skipif.inc files.
2021-06-11 12:58:44 +02:00

124 lines
1.8 KiB
PHP

--TEST--
Bug #26639 (mb_convert_variables() clutters variables beyond the references)
--EXTENSIONS--
mbstring
--FILE--
<?php
$a = "あいうえお";
$b = $a;
mb_convert_variables("EUC-JP", "Shift_JIS", $b);
var_dump($a);
var_dump($b);
unset($a);
unset($b);
$a = "あいうえお";
$b = &$a;
mb_convert_variables("EUC-JP", "Shift_JIS", $b);
var_dump($a);
var_dump($b);
unset($a);
unset($b);
$a = "あいうえお";
$b = array($a);
$c = $b;
mb_convert_variables("EUC-JP", "Shift_JIS", $c);
var_dump($b);
var_dump($c);
unset($a);
unset($b);
unset($c);
$a = "あいうえお";
$b = array(&$a);
$c = $b;
mb_convert_variables("EUC-JP", "Shift_JIS", $c);
var_dump($b);
var_dump($c);
unset($a);
unset($b);
unset($c);
$a = "あいうえお";
$b = array($a);
$c = &$b;
mb_convert_variables("EUC-JP", "Shift_JIS", $c);
var_dump($b);
var_dump($c);
unset($a);
unset($b);
unset($c);
$a = "あいうえお";
$b = array(&$a);
$c = &$b;
mb_convert_variables("EUC-JP", "Shift_JIS", $c);
var_dump($b);
var_dump($c);
unset($a);
unset($b);
unset($c);
$a = array(array("あいうえお"));
$b = $a;
$c = $b;
mb_convert_variables("EUC-JP", "Shift_JIS", $c);
var_dump($b);
var_dump($c);
unset($a);
unset($b);
unset($c);
?>
--EXPECT--
string(10) "あいうえお"
string(10) "、「、、、ヲ、ィ、ェ"
string(10) "、「、、、ヲ、ィ、ェ"
string(10) "、「、、、ヲ、ィ、ェ"
array(1) {
[0]=>
string(10) "あいうえお"
}
array(1) {
[0]=>
string(10) "、「、、、ヲ、ィ、ェ"
}
array(1) {
[0]=>
&string(10) "あいうえお"
}
array(1) {
[0]=>
string(10) "、「、、、ヲ、ィ、ェ"
}
array(1) {
[0]=>
string(10) "、「、、、ヲ、ィ、ェ"
}
array(1) {
[0]=>
string(10) "、「、、、ヲ、ィ、ェ"
}
array(1) {
[0]=>
string(10) "、「、、、ヲ、ィ、ェ"
}
array(1) {
[0]=>
string(10) "、「、、、ヲ、ィ、ェ"
}
array(1) {
[0]=>
array(1) {
[0]=>
string(10) "あいうえお"
}
}
array(1) {
[0]=>
array(1) {
[0]=>
string(10) "、「、、、ヲ、ィ、ェ"
}
}