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" <[EMAIL PROTECTED]>
To: "Daniel Beckham" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
--
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]