/** * array_map */ function parse($num) { $num += 0; return $num * $num * $num; } $arr = array(1,2,3,4,5); print_r(array_map('parse', $arr));