#31961 [Opn->Bgs]: undefined function array_intersect_key()
| From: | tony2001@php.net | Date: | Sun, 13 Feb 2005 21:51:37 +0000 |
| Subject: | #31961 [Opn->Bgs]: undefined function array_intersect_key() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-74003@lists.php.net to get a copy of this message | ||
ID: 31961
Updated by: tony2001@php.net
Reported By: bart at mediawave dot nl
-Status: Open
+Status: Bogus
Bug Type: Arrays related
Operating System: WinXP
PHP Version: 5.0.3
New Comment:
array_diff_key(), array_diff_ukey(), array_intersect_key() &
array_intersect_ukey() were added only in 5.1.0.
Previous Comments:
------------------------------------------------------------------------
[2005-02-13 22:22:18] bart at mediawave dot nl
Description:
------------
array_intersect_key() seems undefined.
Reproduce code:
---------------
<?php
$array1 = array('blue' => 1, 'red' => 2, 'green' => 3,
'purple' =>
4);
$array2 = array('green' => 5, 'blue' => 6, 'yellow' => 7,
'cyan' =>
8);
var_dump(array_intersect_key($array1, $array2));
?>
Expected result:
----------------
array(2) {
["blue"]=>
int(1)
["green"]=>
int(3)
})
Actual result:
--------------
Fatal error: Call to undefined function array_intersect_key() in
D:\Inetpub\wwwroot\phpbugs\array_intersect_key.php on line 13
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31961&edit=1