It splits an array into chunks
Example
<?php
echo “<pre>”;
$array = array(‘a’, ‘b’, ‘c’, ‘d’, ‘e’);
print_r(array_chunk($array, 3));
?>
Output
Array
(
[0] => Array
(
[0] => a
[1] => b
[2] => c
)
[1] => Array
(
[0] => d
[1] => e
)
)
It converts the keys of an array into uppercase
Example
<?php
echo “<pre>”;
$array = array(“FirSt” => 17, “SecOnd” => 7);
print_r(array_change_key_case($array, CASE_UPPER));
?>
Output
Array
(
[FIRST] => 17
[SECOND] => 7
)
It returns hyperbolic tangent
Example
<?php
echo tanh(45);
?>
Output
1
It returns tangent value
Example
<?php
echo tan(45);
?>
Output
1.6197751905439
It seed the random number generator
Example
<?php
srand(mktime());
echo(rand());
?>
Output
675098144
It returns Square root
Example
<?php
echo sqrt(16);
?>
Output
4
it returns hyperbolic sine
Example
<?php
echo sinh(17.7);
?>
Output
24321050.753167
it returns sine value
Example
<?php
echo sin(17.7);
?>
Output
-0.91258244979118
It rounds a float
Example
<?php
echo round(17.7);
?>
Output
18
It generates a random integer
Example
<?php
echo rand();
?>
Output
648369316
Zend | Magento Certified PHP | eCommerce Architect