php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #78523 [RU] Wrong translation for function array_keys
Submitted: 2019-09-10 07:35 UTC Modified: 2019-09-19 05:46 UTC
From: tecdoc at ukr dot net Assigned: sergey (profile)
Status: Closed Package: Translation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
10 - 2 = ?
Subscribe to this entry?

 
 [2019-09-10 07:35 UTC] tecdoc at ukr dot net
Description:
------------
---
From manual page: https://php.net/function.array-keys
---
Если указан параметр search_value, функция возвращает только ключи, совпадающие с этим параметром.  - ЭТО НЕ ПРАВИЛЬНО!!!!!
!!!Не ключи совпадают с search_value, а значения!!!

Нужно както так
==================
Если указан параметр search_value, функция возвращает ключи у которых значения совпадают с этим параметром.

Вот оригинал.
If a search_value is specified, then only the keys ***for that value*** are returned. Otherwise, all the keys from the array are returned. 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-09-10 07:39 UTC] tecdoc at ukr dot net
$test = Array (
    11 => 14,
    10 => 9,
    12 => 7,
    13 => 7,
    14 => 4,
    15 => 6,
    );
    $search_value = max($test); // 14
    $maxs = array_keys($test, $search_value);
    var_dump($maxs);
 [2019-09-10 07:41 UTC] tecdoc at ukr dot net
$test = Array (
    11 => 14,
    10 => 9,
    12 => 7,
    13 => 7,
    14 => 4,
    15 => 6,
    );

    $search_value = max($test)); 
    var_dump($search_value);// 14

    $maxs = array_keys($test, $search_value);
    var_dump($maxs);
 [2019-09-10 07:43 UTC] tecdoc at ukr dot net
ЛУчше будет так
================
Если указан параметр search_value, функция возвращает ключи у которых значения элементов массива совпадают с этим параметром.
 [2019-09-10 08:04 UTC] cmb@php.net
-Summary: Wrong Russin translation for function array_keys +Summary: [RU] Wrong translation for function array_keys -Package: *Languages/Translation +Package: Translation problem
 [2019-09-19 05:45 UTC] sergey@php.net
Automatic comment from SVN on behalf of sergey
Revision: http://svn.php.net/viewvc/?view=revision&revision=348014
Log: Doc Bug #78523
Fixed by tecdoc@ukr.dot.net
 [2019-09-19 05:46 UTC] sergey@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: sergey
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 05:01:28 2024 UTC