php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #13302 different behavior of array_diff in php4.0.4pl1 and php4.0.5
Submitted: 2001-09-14 09:41 UTC Modified: 2001-09-14 19:11 UTC
From: bleek at jobpilot dot de Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.0.5 OS: linux
Private report: No CVE-ID: None
 [2001-09-14 09:41 UTC] bleek at jobpilot dot de
<?php
 
$a=array_diff(array("1"),array(1));
 
var_dump($a);
 
?>

X-Powered-By: PHP/4.0.4pl1
Content-type: text/html
 
array(1) {
  [0]=>
  string(1) "1"
}       

X-Powered-By: PHP/4.0.5
Content-type: text/html
 
array(0) {
}         

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-09-14 19:11 UTC] jeroen@php.net
Documentation problem... And fixed.

I changed array_unique & array_diff, but don't know exactly what versions which behaviour has. Can someone please clarify that?

in 4.0.3pl1 & 4.0.8-dev array_diff behaves in this case like 4.0.5 (and NOT like 4.0.4pl1)
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed May 07 10:01:28 2025 UTC