One way to find the standard deviation of all keys in a PHP map (associative array) is by using the array_keys() function to extract all the keys into a new array, and then using the stats_standard_deviation() function from the PHP math extension (which must be installed and enabled on your server) to calculate the standard deviation:
main.php353 chars19 lines
In this example, the output is 1.5811388300842, which is the standard deviation of the keys in the $data
array.
gistlibby LogSnag