On Sun, Jan 06, 2002 at 01:14:23AM +0100, Markus Fischer wrote: > On Sun, Jan 06, 2002 at 12:05:45AM -0000, [EMAIL PROTECTED] wrote : > > ereg_replace is behaving as designed, more or less. the behavior of an > > empty first parameter is undefined (although with the bundled regular > > expression engine, it will leave the string unchanged and display an > > error message). > > To me its quite defined. You get REG_EMPTY warning and the > return value is false (at leat, since 4.0.6).
it depends on the regex library used. the bundled one returns REG_EMPTY, various system regex libraries may behave as the bug reporter saw. if we want to define one, we should be checking it ourselves. (i suppose it may be defined by POSIX. in any case, we leave it up to the regex library used to interpret the pattern as it sees fit to do. preg_replace() obviously has a more well-defined behavior, since there's only one implementation of the PCRE library. and as i pointed out in my comment to the bug, it behaves as the bug report says ereg_replace does on that system.) jim -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]