Microsoft Word - Core PHP Programming Using PHP to Build Dynamic Web Sites

(singke) #1

<?
//print 14
print(ceil(13.2));
?>


double cos(double angle)


The cos function returns the cosine of an angle expressed in radians.


<?
//prints 1
print(cos(2 * pi()));
?>


string decbin(integer value)


The decbin function returns a binary representation of an integer as a string.


<?
//prints 11111111
print(decbin(255));
?>


string dechex(integer value)


The dechex function returns the hexadecimal representation of the value argument as a
string.


<?
//prints ff
print(dechex(255));
?>


string decoct(integer value)


The decoct function returns the octal representation of the value argument as a string.


<?
//prints 377

Free download pdf