mirror of
https://github.com/php/php-src.git
synced 2024-09-30 06:16:08 +00:00
48 lines
632 B
Plaintext
48 lines
632 B
Plaintext
|
--TEST--
|
||
|
Bug #42233 (extract(): scandic characters not allowed as variable name)
|
||
|
--FILE--
|
||
|
<?php
|
||
|
|
||
|
$test = array(
|
||
|
'a' => '1',
|
||
|
'æ' => '2',
|
||
|
'æøåäö' => '3',
|
||
|
);
|
||
|
|
||
|
var_dump($test);
|
||
|
var_dump(extract($test));
|
||
|
var_dump($a);
|
||
|
var_dump($æ);
|
||
|
var_dump($æøåäö);
|
||
|
|
||
|
echo "Done.\n";
|
||
|
?>
|
||
|
--EXPECT--
|
||
|
array(3) {
|
||
|
["a"]=>
|
||
|
string(1) "1"
|
||
|
["æ"]=>
|
||
|
string(1) "2"
|
||
|
["æøåäö"]=>
|
||
|
string(1) "3"
|
||
|
}
|
||
|
int(3)
|
||
|
string(1) "1"
|
||
|
string(1) "2"
|
||
|
string(1) "3"
|
||
|
Done.
|
||
|
--UEXPECT--
|
||
|
array(3) {
|
||
|
[u"a"]=>
|
||
|
unicode(1) "1"
|
||
|
[u"æ"]=>
|
||
|
unicode(1) "2"
|
||
|
[u"æøåäö"]=>
|
||
|
unicode(1) "3"
|
||
|
}
|
||
|
int(3)
|
||
|
unicode(1) "1"
|
||
|
unicode(1) "2"
|
||
|
unicode(1) "3"
|
||
|
Done.
|