Microsoft Word - Core PHP Programming Using PHP to Build Dynamic Web Sites
//encrypt message $code = mcrypt_cbc(MCRYPT_BLOWFISH_128, $key, $message, MCRYPT_ENCRYPT); //pring decrypted message print(mcryp ...
//loop over each one foreach($algorithm as $value) { print("\n"); print("". mcrypt_get_cipher_name($value). ""); print("". mcryp ...
$code = mcrypt_ofb(MCRYPT_BLOWFISH_128, $key, $message, MCRYPT_ENCRYPT, $iv); //pring decrypted message print(mcrypt_ofb(MCRYPT_ ...
Regular expressions offer a powerful way to test strings for the presence of patterns. They use a language all their own to desc ...
If the pattern contains subexpressions in parentheses, the replacement argument may contain a special code for specifying which ...
The eregi_replace function operates identically to ereg_replace with the exception that letters are matched with no regard for u ...
The preg_grep function compares the elements of the data argument that match the given pattern. boolean preg_match(string patter ...
Figure 9-12. preg_match_all. ...
...
If PREG_PATTERN_ORDER is used, the first element of the matches array will contain an array of all the matches against the full ...
array preg_split(string pattern, string text, integer limit) The preg_split function returns an array of substrings from the tex ...
Chapter 10. MATHEMATICAL FUNCTIONS Common Math.................................................................................. ...
double asin(double value) The asin function returns the arc sine of the value argument. Trying to findthe arc sine of a value gr ...
<? // print asin values from -1 to 1 print("<TABLE BORDER=\"1\">\n"); print("xasin(x)\n"); for($index = -1; $index > ...
string base_convert(string value, int base, int new_base) The base_convert function converts a number from one base to another. ...
<? //print 14 print(ceil(13.2)); ?> double cos(double angle) The cos function returns the cosine of an angle expressed in ...
print(decoct(255)); ?> double deg2rad(double angle) The deg2rad function returns the radians that correspond to angle argumen ...
print(hexdec("0x7FAD")); print("\n"); ?> double log(double value) The log function returns the natural logarithm of the value ...
//prints 3.1415926535898 print(M_PI. "\n"); ?> double pow(double base, double power) Use the pow function to raise the base a ...
The sin function returns the sine of the angle. The angle is assumed to be in radians. <? //prints 1 print(sin(0.5 * M_PI)); ...
«
10
11
12
13
14
15
16
17
18
19
»
Free download pdf