9e127b9831
Most of this is ported over, except some omissions:
- array_filter, array_key_exists (suspected we had coverage already;
one is a bytecode, and one was rewritten in hhas recently)
- some random cases distinguishing init_null_variant vs. null_variant
36 linhas
1.0 KiB
PHP
36 linhas
1.0 KiB
PHP
<?php
|
|
|
|
$fruits = array(
|
|
"d" => "lemon",
|
|
"a" => "orange",
|
|
"b" => "banana",
|
|
"c" => "apple"
|
|
);
|
|
|
|
asort($fruits);
|
|
var_dump($fruits);
|
|
|
|
$arr = array("at", "\xe0s", "as");
|
|
i18n_loc_set_default("en_US");
|
|
asort($arr, 0, true);
|
|
$arr = array("num2ber", "num1ber", "num10ber");
|
|
i18n_loc_set_default("en_US");
|
|
i18n_loc_set_attribute(UCOL_NUMERIC_COLLATION, UCOL_ON);
|
|
i18n_loc_set_strength(UCOL_PRIMARY);
|
|
asort($arr, SORT_REGULAR, true);
|
|
i18n_loc_set_attribute(UCOL_NUMERIC_COLLATION, UCOL_DEFAULT);
|
|
i18n_loc_set_strength(UCOL_DEFAULT);
|
|
var_dump($arr);
|
|
|
|
$arr = array("G\xediron", // í (Latin-1)
|
|
"G\xc3\xb3nzales", // ó (UTF-8)
|
|
"G\xc3\xa9 ara", // é (UTF-8)
|
|
"G\xe1rcia"); // á (Latin-1)
|
|
i18n_loc_set_default("en_US");
|
|
i18n_loc_set_attribute(UCOL_NUMERIC_COLLATION, UCOL_ON);
|
|
i18n_loc_set_strength(UCOL_PRIMARY);
|
|
asort($arr, SORT_REGULAR, true);
|
|
i18n_loc_set_attribute(UCOL_NUMERIC_COLLATION, UCOL_DEFAULT);
|
|
i18n_loc_set_strength(UCOL_DEFAULT);
|
|
var_dump($arr);
|