Monday, October 12, 2009

Re: [BLUG] PHP ereg() question

On Mon, Oct 12, 2009 at 08:11:30PM +0000, Mark Krenz wrote:
>
> Its weird though because I would have thought the opposite would be
> true based on the comments people make about Perl (that its old and
> obfuscated). In our opinion obviously PCRE are better, but that doesn't
> really make them more obvious. I would think that given that most unix
> utilities use POSIX RE and not PCRE, that POSIX would be more standard.

You've not used a modern version of GREP. The recent GNU GREP has
support for libpcre, providing Perl Compatible Regular Expressions.

Given that SED/AWK can be replaced by Perl directly, Grep is the big
tool using Posix regular expressions -- and by default it uses Standard
Regular Expressions.

You also have to take in to account that any tools not explicitly
targetting Posix Regex actually targets Perl Compatible Regex...

> As I stated to the developers when I made my first post on PHP-DEV
> though, this wasn't about which was better, it was only about giving the
> proper amount of time (or major releases) in between announcing that
> something is deprecated and removing it. The PHP core developers think
> 1 minor release is enough warning for a major core function.

This *is* PHP we're talking about. It has a big enough footprint in the
market that it doesn't matter what they do.

How many projects will be so annoyed by it that they'll move to another
language? Probably none. Instead the folks actually running the services
will have to support crappy obsolete versions of PHP for longer periods
of time. (Just as it was only recently that PHP 4 stopped being included
in many distros.)

--
Steven Black <blacks@indiana.edu> / KeyID: 8596FA8E
Fingerprint: 108C 089C EFA4 832C BF07 78C2 DE71 5433 8596 FA8E

_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Re: [BLUG] PHP ereg() question

Its weird though because I would have thought the opposite would be
true based on the comments people make about Perl (that its old and
obfuscated). In our opinion obviously PCRE are better, but that doesn't
really make them more obvious. I would think that given that most unix
utilities use POSIX RE and not PCRE, that POSIX would be more standard.

As I stated to the developers when I made my first post on PHP-DEV
though, this wasn't about which was better, it was only about giving the
proper amount of time (or major releases) in between announcing that
something is deprecated and removing it. The PHP core developers think
1 minor release is enough warning for a major core function.


On Mon, Oct 12, 2009 at 08:00:43PM GMT, Sams, Weldon [wsams@indiana.edu] said the following:
> I agree with Steven. Also the preg functions are quite a bit faster.
>
> Weldon
>
> > -----Original Message-----
> > From: blug-bounces@cs.indiana.edu [mailto:blug-bounces@cs.indiana.edu]
> > On Behalf Of Black, Steven Wayne
> > Sent: Monday, October 12, 2009 15:53
> > To: Bloomington LINUX Users Group
> > Subject: Re: [BLUG] PHP ereg() question
> >
> > This is Extended Regular Expressions vs. Perl Compatible Regular
> > Expressions?
> >
> > I don't use PHP, so this doesn't impact me, however in general most
> > people expect Perl Compatible Regular Expressions, so I expect it will
> > clear up a number of issues.
> >
> > Cheers,
> > Steven Black
> >
> > On Mon, Oct 12, 2009 at 07:40:30PM +0000, Mark Krenz wrote:
> > >
> > > Any of you on the list use PHP? Did you know they are going to
> > remove
> > > the ereg set of functions in PHP 6 in favor of the PCRE functions
> > > (preg_match, etc.). Could I ask how do you feel about this?
> > >
> > > Thanks.
> > >
> > > --
> > > Mark Krenz
> > > Bloomington Linux Users Group
> > > http://www.bloomingtonlinux.org/
> > > _______________________________________________
> > > BLUG mailing list
> > > BLUG@linuxfan.com
> > > http://mailman.cs.indiana.edu/mailman/listinfo/blug
> >
> > _______________________________________________
> > BLUG mailing list
> > BLUG@linuxfan.com
> > http://mailman.cs.indiana.edu/mailman/listinfo/blug
>
> _______________________________________________
> BLUG mailing list
> BLUG@linuxfan.com
> http://mailman.cs.indiana.edu/mailman/listinfo/blug
>

--
Mark Krenz
Bloomington Linux Users Group
http://www.bloomingtonlinux.org/
_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Re: [BLUG] PHP ereg() question

Ding ding ding. I too develop in Perl a lot and like PCRE better, but
I've been doing PHP development since 1997 and got used to using ereg()
and always thought that ereg was the more official function to use.

I've gotten into this big one-sided debate on the PHP internals mailing
list with all the core devs about how giving notice of removing the
ereg() one or two minor versions prior to PHP 6 is not enough time.
Pretty much everyone there disagrees with me and think its plenty of
time given that PHP 6 won't be out until late 2010.

Obviously none of them ever need to support PHP upgrades and don't
realize that most Linux distros don't include the latest PHP, in fact,
most of them include a version that is not supported by the PHP devs.

And amazingly enough, one guy called me a troll and now everyone is
just telling me to write a patch. Why should I have to write a patch?
Millions of people will be affected by this and they don't realize that
(or seem to care). Its really annoying and I needed to talk to some
more neutral people about it to get my bearings.

According to the people who answered "why this is happening", its
because PHP 6 will have unicode support and they don't feel like making
the changes to ereg to support unicode. Which seems incredibly
irresponsible given that PHP has hundreds of thousands of developers.


On Mon, Oct 12, 2009 at 07:59:24PM GMT, David Ernst [david.ernst@davidernst.net] said the following:
> Yeah, I learned RegExp's in perl, so whenever they aren't like perl, I
> get confused. I don't use PHP all that often, but when I do, I prefer
> the preg-style anyway. I don't know if I've ever use the ereg style.
> Having said that, I don't know why they'd have to remove it and
> require a bunch of people to have to go update existing
> code... harmless enough to leave them in, isn't it?
>
> David
>
>
> On Mon, Oct 12, 2009 at 03:53:04PM -0400, Steven Black wrote:
> >This is Extended Regular Expressions vs. Perl Compatible Regular
> >Expressions?
> >
> >I don't use PHP, so this doesn't impact me, however in general most
> >people expect Perl Compatible Regular Expressions, so I expect it will
> >clear up a number of issues.
> >
> >Cheers,
> >Steven Black
> >
> >On Mon, Oct 12, 2009 at 07:40:30PM +0000, Mark Krenz wrote:
> >>
> >> Any of you on the list use PHP? Did you know they are going to remove
> >> the ereg set of functions in PHP 6 in favor of the PCRE functions
> >> (preg_match, etc.). Could I ask how do you feel about this?
> >>
> >> Thanks.
> >>
> >> --
> >> Mark Krenz
> >> Bloomington Linux Users Group
> >> http://www.bloomingtonlinux.org/
> >> _______________________________________________
> >> BLUG mailing list
> >> BLUG@linuxfan.com
> >> http://mailman.cs.indiana.edu/mailman/listinfo/blug
> >
> >_______________________________________________
> >BLUG mailing list
> >BLUG@linuxfan.com
> >http://mailman.cs.indiana.edu/mailman/listinfo/blug
> _______________________________________________
> BLUG mailing list
> BLUG@linuxfan.com
> http://mailman.cs.indiana.edu/mailman/listinfo/blug
>

--
Mark Krenz
Bloomington Linux Users Group
http://www.bloomingtonlinux.org/
_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Re: [BLUG] PHP ereg() question

I agree with Steven. Also the preg functions are quite a bit faster.

Weldon

> -----Original Message-----
> From: blug-bounces@cs.indiana.edu [mailto:blug-bounces@cs.indiana.edu]
> On Behalf Of Black, Steven Wayne
> Sent: Monday, October 12, 2009 15:53
> To: Bloomington LINUX Users Group
> Subject: Re: [BLUG] PHP ereg() question
>
> This is Extended Regular Expressions vs. Perl Compatible Regular
> Expressions?
>
> I don't use PHP, so this doesn't impact me, however in general most
> people expect Perl Compatible Regular Expressions, so I expect it will
> clear up a number of issues.
>
> Cheers,
> Steven Black
>
> On Mon, Oct 12, 2009 at 07:40:30PM +0000, Mark Krenz wrote:
> >
> > Any of you on the list use PHP? Did you know they are going to
> remove
> > the ereg set of functions in PHP 6 in favor of the PCRE functions
> > (preg_match, etc.). Could I ask how do you feel about this?
> >
> > Thanks.
> >
> > --
> > Mark Krenz
> > Bloomington Linux Users Group
> > http://www.bloomingtonlinux.org/
> > _______________________________________________
> > BLUG mailing list
> > BLUG@linuxfan.com
> > http://mailman.cs.indiana.edu/mailman/listinfo/blug
>
> _______________________________________________
> BLUG mailing list
> BLUG@linuxfan.com
> http://mailman.cs.indiana.edu/mailman/listinfo/blug

_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Re: [BLUG] PHP ereg() question

Yeah, I learned RegExp's in perl, so whenever they aren't like perl, I
get confused. I don't use PHP all that often, but when I do, I prefer
the preg-style anyway. I don't know if I've ever use the ereg style.
Having said that, I don't know why they'd have to remove it and
require a bunch of people to have to go update existing
code... harmless enough to leave them in, isn't it?

David


On Mon, Oct 12, 2009 at 03:53:04PM -0400, Steven Black wrote:
>This is Extended Regular Expressions vs. Perl Compatible Regular
>Expressions?
>
>I don't use PHP, so this doesn't impact me, however in general most
>people expect Perl Compatible Regular Expressions, so I expect it will
>clear up a number of issues.
>
>Cheers,
>Steven Black
>
>On Mon, Oct 12, 2009 at 07:40:30PM +0000, Mark Krenz wrote:
>>
>> Any of you on the list use PHP? Did you know they are going to remove
>> the ereg set of functions in PHP 6 in favor of the PCRE functions
>> (preg_match, etc.). Could I ask how do you feel about this?
>>
>> Thanks.
>>
>> --
>> Mark Krenz
>> Bloomington Linux Users Group
>> http://www.bloomingtonlinux.org/
>> _______________________________________________
>> BLUG mailing list
>> BLUG@linuxfan.com
>> http://mailman.cs.indiana.edu/mailman/listinfo/blug
>
>_______________________________________________
>BLUG mailing list
>BLUG@linuxfan.com
>http://mailman.cs.indiana.edu/mailman/listinfo/blug
_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Re: [BLUG] PHP ereg() question

This is Extended Regular Expressions vs. Perl Compatible Regular
Expressions?

I don't use PHP, so this doesn't impact me, however in general most
people expect Perl Compatible Regular Expressions, so I expect it will
clear up a number of issues.

Cheers,
Steven Black

On Mon, Oct 12, 2009 at 07:40:30PM +0000, Mark Krenz wrote:
>
> Any of you on the list use PHP? Did you know they are going to remove
> the ereg set of functions in PHP 6 in favor of the PCRE functions
> (preg_match, etc.). Could I ask how do you feel about this?
>
> Thanks.
>
> --
> Mark Krenz
> Bloomington Linux Users Group
> http://www.bloomingtonlinux.org/
> _______________________________________________
> BLUG mailing list
> BLUG@linuxfan.com
> http://mailman.cs.indiana.edu/mailman/listinfo/blug

_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Re: [BLUG] PHP ereg() question

On Mon, Oct 12, 2009 at 3:40 PM, Mark Krenz <mark@slugbug.org> wrote:
>  Any of you on the list use PHP?  Did you know they are going to remove
> the ereg set of functions in PHP 6 in favor of the PCRE functions
> (preg_match, etc.). Could I ask how do you feel about this?

I'd rather they remove PHP completely. =)

--
Jeremy L. Gaddis
http://evilrouters.net/

_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

[BLUG] PHP ereg() question

Any of you on the list use PHP? Did you know they are going to remove
the ereg set of functions in PHP 6 in favor of the PCRE functions
(preg_match, etc.). Could I ask how do you feel about this?

Thanks.

--
Mark Krenz
Bloomington Linux Users Group
http://www.bloomingtonlinux.org/
_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug