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.

sql_regcase<br />

string sql_regcase(string match)<br />

Creates and returns a regular expression pattern that matches match, ignoring case. The<br />

resulting pattern contains each character in match in each case; for example, given<br />

“O’Reilly”, the function returns “[Oo][’] [Rr][Ee][Ii][Ll][Ll][Yy]”.<br />

sqrt<br />

double sqrt(double number)<br />

Returns the square root of number.<br />

srand<br />

void srand(int seed)<br />

Seeds the standard pseudorandom-number generator with seed. You should call this<br />

function with a varying number, such as that returned by time( ), before making calls to<br />

rand( ).<br />

sscanf<br />

mixed sscanf(string string, string format[, mixed variable1 ...])<br />

Parses string for values of types given in format; the values found are either returned in an<br />

array or, if variable1 through variableN (which must be variables passed by reference) are<br />

given, in those variables.<br />

The format string is the same as that used in sprintf( ). For example:<br />

$name = sscanf("Name: k.tatroe", "Name: %s"); // $name has "k.tatroe"<br />

list($month, $day, $year) = sscanf("June 30, 2001", "%s %d, %d");<br />

$count = sscanf("June 30, 2001", "%s %d, %d", &$month, &$day, &$year);<br />

stat<br />

array stat(string path)<br />

Returns an associative array of information about the file path. Ifpath is a symbolic link,<br />

information about the file path references is returned. See fstat for a list of the values<br />

returned and their meanings.<br />

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

Copyright © 2002 O’Reilly & Associates, Inc. All rights reserved.<br />

stat | 443

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

Saved successfully!

Ooh no, something went wrong!