php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41918 Random languages
Submitted: 2007-07-07 04:39 UTC Modified: 2007-07-15 11:23 UTC
From: ae at instinctive dot de Assigned:
Status: Not a bug Package: Website problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ae at instinctive dot de
New email:
PHP Version: OS:

 

 [2007-07-07 04:39 UTC] ae at instinctive dot de
Description:
------------
PHP.net is showing manual pages for PHP functions in random languages, with several languages scattered all over the page. WTF??? This has been like that for at least several days... (cookies are activated, so this is not a duplicate)

Reproduce code:
---------------
Firefox 1.5.0.12 on Windows XP Professional, Windows XP German version and set to German (apart from keyboard layout, which is set to English), browser language set to English.. however, no french or portuguese ;)

Expected result:
----------------
A page displayed in one language only (that I can actually read ;)

Actual result:
--------------
view this page in English
array_filter

(PHP 4 >= 4.0.6, PHP 5)
array_filter --  Filtreaz� elementele unui tablou utiliz�nd o func�ie callback
Descriere
array array_filter ( array input [, mixed callback])

array_filter() returnez� un tablou con�in�nd toate elementele parametrului input filtrate �n concordan�� cu func�ia callback. Dac� input este un tablou asociativ, indec�ii sunt p�stra�i.

Exemplu 1. Exemplu de utilizare array_filter()
function odd($var) {
    return ($var % 2 == 1);
}

function even($var) {
    return ($var % 2 == 0);
}

$array1 = array ("a"=>1, "b"=>2, "c"=>3, "d"=>4, "e"=>5);
$array2 = array (6, 7, 8, 9, 10, 11, 12);

echo "Odd :\n";
print_r(array_filter($array1, "odd"));
echo "Even:\n";
print_r(array_filter($array2, "even"));

Rezultatul va fi:
Odd :
Array
(
    [a] => 1
    [c] => 3
    [e] => 5
)
Even:
Array
(
    [0] => 6
    [2] => 8
    [4] => 10
    [6] => 12
)

    Not?: �n locul numelui unei func�ii, poate fi folosit un tablou con�in�nd o referin�� c�tre un obiect sau numele unei metode.

Utilizatorii ar trebui s� nu schimbe tabloul din func�ia callback. De exemplu, ad�ugarea/�tergerea unui element sau anularea tabloului la care se aplic� array_filter(). Dac� tabloul ini�ial este schimbat comportamentul func�iei este impredictibil.

Vezi, de asemenea, array_map() �i array_reduce(). 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-07-15 11:23 UTC] bjori@php.net
The manual tries its best to guess your preferred language with various tricks.

You can overwrite these guesses by setting your preferred language at http://www.php.net/my.php
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 01 14:01:29 2024 UTC