note 106706 deleted from function.max by thiago
| From: | thiago@php.net | Date: | Wed, 30 Nov 2011 13:08:54 +0000 |
| Subject: | note 106706 deleted from function.max by thiago | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-184824@lists.php.net to get a copy of this message | ||
Note Submitter: milo lamar
----
This might be a gotcha. I cannot explain exactly why this happens. I pass 2 arrays of 1 element
with string keys and integer values.
This might just need documentation or might be a bug. Not sure.
<?php
var_dump(max(array('RewardSingles' => 21), array('DefaultDiscountSingles'
=> 1)));
//Actually returns:
//array(1) { ["DefaultDiscountSingles"]=> int(1) }
//Expected:
//array(1) { ["RewardSingles"]=> int(21) }
?>