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
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: tecdoc at ukr dot net
New email:
PHP Version: OS:

 

 [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-2019 The PHP Group
All rights reserved.
Last updated: Fri Oct 18 03:01:26 2019 UTC