Re: switch, equality and preg_match

From: Date: Mon, 02 Jul 2001 22:01:43 +0000
Subject: Re: switch, equality and preg_match
References: 1 2 3 4 5  Groups: php.dev 
Request: Send a blank email to php-dev+get-58757@lists.php.net to get a copy of this message
IMO, I like preg_match to return a bool and preg_match_all return a count. But that is me. It may be thought of as inconsistent to some. I just see the functions has having a different purpose. Brian Moon ------------------------------------------ dealnews.com, Inc. Makers of dealnews & dealmac http://dealnews.com/ | http://dealmac.com/ ----- Original Message ----- From: "Andrei Zmievski" <andrei@ispi.net> To: "Daniel Beckham" <danbeck@dealnews.com>; <php-dev@lists.php.net> Sent: Monday, July 02, 2001 3:47 PM Subject: Re: [PHP-DEV] switch, equality and preg_match > On Sun, 01 Jul 2001, Andrei Zmievski wrote: > > At 09:06 AM 7/1/01 -0500, Daniel Beckham wrote: > > >Someone poke me when you decide what to do and I'll change the return type > > >in the preg_match docs. > > > > I need to take a closer look at the code to see why it is that way. > > Okay, this is because both preg_match and preg_match_all use the same > function internally, so the return type for both is an integer > indicating the number of matches. Do you really think it should be > changed? > > -Andrei > > "Tomorrow the sun will rise. And who knows what the tide will bring?" > - Tom Hanks, in "Cast Away" > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net > For additional commands, e-mail: php-dev-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > >

« previous php.dev (#58757) next »