[ Pobierz całość w formacie PDF ]
.If mode is 0,an associative array is returned withthe byte value as key and the numberof ocurrences as value.strnatcmp(string s1, int Returns the result of stringstring s2) comparison using  natural algorithmstrnatcasecmp(string s1, int Returns the result of a case-string s2) insensitive string comparison using natural algorithmsubstr_count(string int Returns the number of times ahaystack, string needle) substring occurs in the stringstr_pad(string input, string Returns input string padded on theint pad_length left or right to specified length with[, string pad_string pad_string[, int pad_type]])sscanf(string str, mixed Implements an ANSI C compatiblestring format sscanf[, string.])TABLE E-16 URL FUNCTIONSFunction Returns Actionparse_url(string url) array Parses a URL and returns itscomponents in an associative array.The array elements are: scheme (e.g.,http), host (e.g., www.mydomain.com), path (e.g., /index.php), query,which is the entire querystring.Continued 3537-4 AppE.f.qc 12/15/00 15:26 Page 462462 Part V: AppendixesTABLE E-16 URL FUNCTIONS (Continued)Function Returns Actionurlencode(string str) string URL-encodes stringurldecode(string str) string Decodes URL-encoded stringrawurlencode(string str) string URL-encodes string.See Chapter 6for the difference between this andurlencode().rawurldecode(string str) string Decodes URL-encoded stringTABLE E-17 VARIABLE SERIALIZING FUNCTIONSFunction Returns Actionserialize(mixed variable) string Returns a string representationof variable (which can later beunserialized)unserialize(string mixed Takes a string representation ofvariable_representation) variable and recreates itTABLE E-18 MISCELLANEOUS FUNCTIONSFunction Returns Actionip2long(string ip_address) int Converts a string containing an(IPv4) Internet Protocol dottedaddress into a proper addresslong2ip(int proper_address) string Converts an (IPv4) Internet networkaddress into a string in Internetstandard dotted formatgetenv(string varname) string Gets the value of an environmentvariableputenv(string setting) void Sets the value of an environmentvariable by using a format ofputenv( ENV_VAR=$foo ); 3537-4 AppE.f.qc 12/15/00 15:26 Page 463Appendix E: PHP Function Reference 463Function Returns Actionflush(void) void Flushes the output buffersleep(int seconds) void Delays for a given number of secondsusleep(int micro_seconds) void Delays for a given number ofmicrosecondsget_current_user(void) string Gets the name of the owner of thecurrent PHP scriptget_cfg_var(string string Gets the value of a PHPoption_name) configuration optionis_resource(mixed var) bool Returns true if variable is a resourceerror_log(string message, int Sends an error message to an errorint message_type log, TCP port, or file[, string destination][, string extra_headers])call_user_func(string mixed Calls a user function that is the firstfunction_name [, mixedparmeter] [, mixed.]) parametercall_user_method(string mixed Calls a user method on a specificmethod_name, object object where the first argument isobject [, mixed the method name, the secondparameter] [, mixed.]) argument is the object, and thesubsequent arguments are theparametersregister_shutdown_ void Registers a user-level function to befunction(stringfunction_name) called on request terminationhighlight_file(string void Outputs a PHP source file withfile_name) syntax highlightshighlight_string(string void Syntax highlights a stringstring)ini_get(string varname) string Gets a configuration optionini_set(string varname, string Sets a configuration option, returnsstring newvalue) false on error and the string of theold value of the configuration optionon successContinued 3537-4 AppE.f.qc 12/15/00 15:26 Page 464464 Part V: AppendixesTABLE E-18 MISCELLANEOUS FUNCTIONS (Continued)Function Returns Actionini_restore(string varname) string Restores the value of a configurationoption specified by varname toits original value set inthe php [ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • necian.htw.pl