05.05.2013 Views

Programming PHP

Programming PHP

Programming PHP

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

eregi<br />

int eregi(string pattern,string string[, array matches])<br />

Searches string for the regular expression pattern (the pattern matching is case-insensitive).<br />

If given, the array matches is filled with the subpattern matches. Returns true if the<br />

pattern matched in string and false if not. See Chapter 4 for more information on using<br />

regular expressions. This is a case-insensitive version of ereg( ).<br />

eregi_replace<br />

string ereg_replace(string pattern, string replace, string string)<br />

Searches for all occurrences of the regular expression pattern in string, replaces them with<br />

replace, and returns the result. The pattern matching is case-insensitive. This is a caseinsensitive<br />

version of ereg_replace( ).<br />

error_log<br />

int error_log(string message, int type[, string destination[, string headers]])<br />

Records an error message to the web server’s error log, to an email address, or to a file. The<br />

first parameter is the message to log. The type is one of the following:<br />

0 message is sent to the <strong>PHP</strong> system log; the message is put into the file<br />

pointed at by the error_log configuration directive.<br />

1 message is sent to the email address destination. If specified, headers<br />

provides optional headers to use when creating the message (see mail for<br />

more information on the optional headers).<br />

3 Appends message to the file destination.<br />

error_reporting<br />

int error_reporting([int level])<br />

Sets the level of errors reported by <strong>PHP</strong> to level and returns the current level; if level is<br />

omitted, the current level of error reporting is returned. The following values are available<br />

for the function:<br />

E_ERROR Runtime warnings<br />

E_WARNING Runtime warnings<br />

E_PARSE Compile-time parse errors<br />

E_NOTICE Runtime notices<br />

E_CORE_ERROR Errors generated internally by <strong>PHP</strong><br />

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

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

error_reporting | 395

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

Saved successfully!

Ooh no, something went wrong!