Bug #67947 [Opn->Nab]: array_keys case-insensitive compare not work even if bool $strict false

From: Date: Tue, 02 Sep 2014 16:34:39 +0000
Subject: Bug #67947 [Opn->Nab]: array_keys case-insensitive compare not work even if bool $strict false
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-187386@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67947&edit=1

 ID:                 67947
 Updated by:         requinix@php.net
 Reported by:        rob_neal at rocketmail dot com
 Summary:            array_keys case-insensitive compare not work even if
                     bool $strict false
-Status:             Open
+Status:             Not a bug
 Type:               Bug
 Package:            Arrays related
 Operating System:   Windows 8.1
 PHP Version:        5.5.16
 Block user comment: N
 Private report:     N

 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php

$strict has nothing to do with case sensitivity.


Previous Comments:
------------------------------------------------------------------------
[2014-09-02 12:04:57] rob_neal at rocketmail dot com

Description:
------------
Running PHP version 5.5.15 on XAMPP for Windows. This is latest version of XAMPP/PHP as of
today's date.

Only changes to default php.ini that I have made are about Mail and XDebug for debugging with Komodo
IDE.

Test script:
---------------
$arr = array('uuu', 'abc','aBC','ABC','abc',
'Def', 'DEF', 'xyz');

//set 3rd argument as $strict=false for case-insensitive
$k = array_keys($arr,'abc',false);

print_r($k);

Expected result:
----------------
Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 ) 

Actual result:
--------------
Array ( [0] => 1 [1] => 4 ) 


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=67947&edit=1


Thread (3 messages)

« previous php.bugs (#187386) next »