Bug #67543 [NEW]: array_values returns invalid value

From: Date: Mon, 30 Jun 2014 05:26:16 +0000
Subject: Bug #67543 [NEW]: array_values returns invalid value
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-186386@lists.php.net to get a copy of this message
From: eachcan at gmail dot com Operating system: All PHP version: 5.4.30 Package: Arrays related Bug Type: Bug Bug description:array_values returns invalid value Description: ------------ --- From manual page: http://www.php.net/function.array-values --- array(0=>array(123)) == array(0=>array(0=>"123")) //true array_values(array(0=>array(123))) // array(0=>array(0=>123)) array_values(array(0=>array(1=>123))) // array(0=>array(0=>123)) array_values(array(0=>array(0=>123))) == array_values(array(0=>array(1=>123))) // false I don't know why, array_values returns completely same values but no equals to each other. Test script: --------------- <?php assert('array(0=>array(123)) == array(0=>array(0=>"123"))'); assert('array_values(array(0=>array(0=>123))) == array_values(array(0=>array(1=>123)))'); Expected result: ---------------- true Actual result: -------------- false -- Edit bug report at https://bugs.php.net/bug.php?id=67543&edit=1 --

« previous php.bugs (#186386) next »