#31961 [Bgs]: undefined function array_intersect_key()

From: Date: Sun, 13 Feb 2005 21:51:51 +0000
Subject: #31961 [Bgs]: undefined function array_intersect_key()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-74002@lists.php.net to get a copy of this message
 ID:               31961
 Updated by:       sniper@php.net
 Reported By:      bart at mediawave dot nl
 Status:           Bogus
 Bug Type:         Arrays related
 Operating System: WinXP
 PHP Version:      5.0.3
 New Comment:

This functions exists only in CVS (HEAD, which will become PHP  5.1
sometime soonish)



Previous Comments:
------------------------------------------------------------------------

[2005-02-13 22:51:36] tony2001@php.net

array_diff_key(), array_diff_ukey(), array_intersect_key() & 
array_intersect_ukey() were added only in 5.1.0.

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

[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


Thread (3 messages)

« previous php.bugs (#74002) next »