Re: [PHP] Unexpected behavior of max() function

2012-12-11 Thread Rodrigo Silva dos Santos
A solution to it is, if you can, enter the array itens without the commas, just array(100,110.453351020813,9); Em 11-12-2012 05:05, Andreas Perstinger escreveu: On 11.12.2012 07:48, "Рогулин С.В." wrote: I encountered with unexpected behavior of max() function. When i pass a parameter ['100',

Re: [PHP] Unexpected behavior of max() function

2012-12-10 Thread Andreas Perstinger
On 11.12.2012 07:48, "Рогулин С.В." wrote: I encountered with unexpected behavior of max() function. When i pass a parameter ['100', '110,453351020813', '9'], this function gives answer '9' var_dump( max(array('100', '110,453351020813', '9')) ); // will output: // string(1) "9" As the out

Re: [PHP] Unexpected behavior of max() function

2012-12-10 Thread Алексей Полев
Because it returns alphabetical highest string. You should change your locale or use dot instead of comma: var_dump( max(array('100', '110*.*453351020813', '9')) ); On 11 December 2012 10:48, "Рогулин С.В." wrote: > Hi, dear subscribers. > > I encountered with unexpected behavior of max() fu

[PHP] Unexpected behavior of max() function

2012-12-10 Thread Рогулин С.В.
Hi, dear subscribers. I encountered with unexpected behavior of max() function. When i pass a parameter ['100', '110,453351020813', '9'], this function gives answer '9' var_dump( max(array('100', '110,453351020813', '9')) ); // will output: // string(1) "9" I can`t understand this behaviou