Re: [PHP-DEV] switch, equality and preg_match

2001-07-03 Thread Brian Moon
;[EMAIL PROTECTED]> Sent: Monday, July 02, 2001 7:21 PM Subject: Re: [PHP-DEV] switch, equality and preg_match > On Mon, Jul 02, 2001 at 05:01:43PM -0500, Brian Moon wrote: > > > IMO, I like preg_match to return a bool and preg_match_all return a count. > > But that is me. It

Re: [PHP-DEV] switch, equality and preg_match

2001-07-02 Thread Jon Parise
On Mon, Jul 02, 2001 at 05:01:43PM -0500, Brian Moon wrote: > 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. That would make sense. preg_matc

Re: [PHP-DEV] switch, equality and preg_match

2001-07-02 Thread Brian Moon
& 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, equal

Re: [PHP-DEV] switch, equality and preg_match

2001-07-02 Thread Andrei Zmievski
On Mon, 02 Jul 2001, Daniel Beckham wrote: > No matter what, the documentation should be changed. It's incorrect whether > you leave the function as is, or not. Although, IMO, I think that it would > be more intuitive to make the function's return type boolean instead of int. > > Hell, for that

Re: [PHP-DEV] switch, equality and preg_match

2001-07-02 Thread Daniel Beckham
ile we are requesting changes. =) Daniel - 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_matc

Re: [PHP-DEV] switch, equality and preg_match

2001-07-02 Thread Andrei Zmievski
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 bot

Re: [PHP-DEV] switch, equality and preg_match

2001-07-01 Thread Brian Moon
.com, Inc. Makers of dealnews, dealmac http://dealnews.com/ | http://dealmac.com/ - Original Message - From: "chrism" <[EMAIL PROTECTED]> To: "Brian Moon" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Sunday, July 01, 2001 1

Re: [PHP-DEV] switch, equality and preg_match

2001-07-01 Thread chrism
> dealnews.com, Inc. > Makers of dealnews, dealmac > http://dealnews.com/ | http://dealmac.com/ > > > - Original Message - > From: "chrism" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> >

Re: [PHP-DEV] switch, equality and preg_match

2001-07-01 Thread Andrei Zmievski
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. -Andrei -- PHP Development Mailing List To unsubscrib

Re: [PHP-DEV] switch, equality and preg_match

2001-07-01 Thread Daniel Beckham
]> Sent: Sunday, July 01, 2001 3:16 AM Subject: Re: [PHP-DEV] switch, equality and preg_match > Here is your culprit: > > RETVAL_LONG(matched); > > The declaration in the docs says the function returns an int. However, the > text of the doc says that the function r

Re: [PHP-DEV] switch, equality and preg_match

2001-07-01 Thread Brian Moon
://dealmac.com/ - Original Message - From: "chrism" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, June 30, 2001 7:02 PM Subject: [PHP-DEV] switch, equality and preg_match > I encountered a problem where the result of a preg_match was FALSE. > This was fed i

Re: [PHP-DEV] switch, equality and preg_match

2001-06-30 Thread Joey Smith
I can answer #2 for you... http://php.net/manual/en/language.types.type-juggling.php http://php.net/manual/en/language.types.string.php#language.types.string.conversion An excerpt from "String Conversion": The value is given by the initial portion of the string. If the string starts with valid

[PHP-DEV] switch, equality and preg_match

2001-06-30 Thread chrism
I encountered a problem where the result of a preg_match was FALSE. This was fed into a switch statement - and I believe PHP executed the the wrong case section. I've tracked this down to preg_match not really returning FALSE combined with SWITCH executing the first case statement always on eithe