05.05.2013 Views

Programming PHP

Programming PHP

Programming PHP

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

cos<br />

double cos(double value)<br />

Returns the cosine of value in radians.<br />

count<br />

int count(mixed value)<br />

Returns the number of elements in the value; for arrays, this is the number of elements in<br />

the array; for any other value, this is 1. If the parameter is a variable and the variable is not<br />

set, 0 is returned.<br />

count_chars<br />

mixed count_chars(string string[, int mode])<br />

Returns the number of occurrences of each byte value from 0–255 in string; mode determines<br />

the form of the result. The possible values of mode are:<br />

crc32<br />

0 (default) Returns an associative array with each byte-value as a key and the<br />

frequency of that byte-value as the value<br />

1 Same as above, except that only byte-values with a nonzero frequency<br />

are listed<br />

2 Same as above, except that only byte-values with a frequency of zero<br />

are listed<br />

3 Returns a string containing all byte-values with a nonzero frequency<br />

4 Returns a string containing all byte-values with a frequency of zero<br />

int crc32(string value)<br />

Calculates and returns the cyclic redundancy checksum (CRC) for value.<br />

create_function<br />

string create_function(string arguments, string code)<br />

Creates an anonymous function with the given arguments and code; returns a generated<br />

name for the function. Such anonymous functions (also called lambda functions) are useful<br />

for short-term callback functions, such as when using usort( ).<br />

390 | Appendix A: Function Reference<br />

This is the Title of the Book, eMatter Edition<br />

Copyright © 2002 O’Reilly & Associates, Inc. All rights reserved.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!