You can just download the source distribution of php, and on a linux commandline do:
grep -inr preg_replace * You'll find all occurances of preg_replace, including it's declaratin, which I have copies below. It seems like it's being passed thru to another function .. Which is also on the same file: ext/pcre/php_pcre.c (I've searched a PHP5.0 sourcetree) 1111 /* {{{ proto string preg_replace(mixed regex, mixed replace, mixed subject [, int limit]) 1112 Perform Perl-style regular expression replacement. */ 1113 PHP_FUNCTION(preg_replace) 1114 { 1115 preg_replace_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); 1116 } 1117 /* }}} */ Greetz, Wouter -----Oorspronkelijk bericht----- Van: Binay Agarwal [mailto:[EMAIL PROTECTED] Verzonden: zaterdag 16 augustus 2003 2:39 Aan: [EMAIL PROTECTED] Onderwerp: [PHP] better understanding of ereg_replace and other functions Hi everybody, Lot of places in manual i came across using "ereg_replace" or "ereg" is very resource intensive and hence its better to use "preg_replace" or "str_replace" or "strpos" if they do the jobs. Now i am very curious to look at the source code (implementation) of these function so as to be able to decide the right choice for me. Can any one of you tell me where to find the source code of these functions. Do they require special privileges ?? Please help me out Binay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php