<!DOCTYPE html>
<html>
<body>

<?php
function myfunction($num)
{
   return($num*$num);
}

$a=array(1,2,3,4,5);
print_r(array_map("myfunction",$a));
?>


</body>
</html>