|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-07-18 20:05 UTC] philip@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 19 19:00:01 2025 UTC |
max(array("tdCommon", 0)) => "tdCommon" // not a number The documentation at php.net/max claims: If one or more of the values is a float, all the values will be treated as floats, and a float is returned. If none of the values is a float, all of them will be treated as integers, and an integer is returned. Evidently, the behaviour of this function was intended to change (extrapolating from http://bugs.php.net/bug.php?id=2676 (bug # 2676)). This should be reflected in the documentation. (I was trying to get the key of the most recent element I had created in a "semi-associative" array by $array[] = $newVal and max as advertised would have done the trick. Could it still work? I don't know, because I don't really know what it's supposed to be doing anymore. For example, what type of sort is being done now?). Csaba Gabor