note 107806 added to function.stats-standard-deviation
| From: | pmcdougl at gac dot edu | Date: | Tue, 06 Mar 2012 22:40:44 +0000 |
| Subject: | note 107806 added to function.stats-standard-deviation | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-186513@lists.php.net to get a copy of this message | ||
It should be known that this function also casts all of the values of the array to floats. If you
pass an array of integers, they will come out as an array of floats.
$data = array(2,3,3,3,3,2,5);
var_dump($data);
$standardDeviation = stats_standard_deviation($data);
var_dump($data);
Prints:
array
0 => int 2
1 => int 3
2 => int 3
3 => int 3
4 => int 3
5 => int 2
6 => int 5
array
0 => float 2
1 => float 3
2 => float 3
3 => float 3
4 => float 3
5 => float 5
6 => float 2
----
Server IP: 192.41.42.26
Probable Submitter: 138.236.71.127
----
Manual Page -- http://www.php.net/manual/en/function.stats-standard-deviation.php
Edit -- https://master.php.net/note/edit/107806
Del: integrated -- https://master.php.net/note/delete/107806/integrated
Del: useless -- https://master.php.net/note/delete/107806/useless
Del: bad code -- https://master.php.net/note/delete/107806/bad+code
Del: spam -- https://master.php.net/note/delete/107806/spam
Del: non-english -- https://master.php.net/note/delete/107806/non-english
Del: in docs -- https://master.php.net/note/delete/107806/in+docs
Del: other reasons-- https://master.php.net/note/delete/107806
Reject -- https://master.php.net/note/reject/107806
Search -- https://master.php.net/manage/user-notes.php