# Why is ereg being deprecated?

- Thread: https://externals.io/message/45744
- Original archive: https://news-web.php.net/php.internals/45744
- Started by Mark Krenz on 2009-10-12T15:46:10+00:00
- Messages: 37
- Page 1 of 2: messages 1 to 25 (25 per page, add `?page=N` to the URL)
- Next page: https://externals.io/message/45744.md?page=2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #45744 — Mark Krenz — 2009-10-12T15:46:10+00:00

URL: https://externals.io/message/45744#45744

I just found this out a couple days ago when I checked the ereg manual
page for something and was shocked.  I searched around a bit but
couldn't find a straight answer on why this function is being removed?
Did the deprecation notice just get made in 5.3 or has it been there
longer than that?

Thanks,
Mark

-- 
Mark S. Krenz
IT Director
Suso Technology Services, Inc.
http://suso.org/

---

## #45745 — Guilherme Blanco — 2009-10-12T15:51:48+00:00

URL: https://externals.io/message/45744#45745 · In reply to: #45744

It was fat, slow and everything that you can do with POSIX regex you
can easily do with PCRE regex, which is faster.

It is a decision forever. Do not expect it to come on PHP 5.4 (?) or PHP 6.

Cheers,


>
>  I just found this out a couple days ago when I checked the ereg manual
> page for something and was shocked.  I searched around a bit but
> couldn't find a straight answer on why this function is being removed?
> Did the deprecation notice just get made in 5.3 or has it been there
> longer than that?
>
> Thanks,
> Mark
>
> --
> Mark S. Krenz
> IT Director
> Suso Technology Services, Inc.
> http://suso.org/
>
> --
> 
> 
>
>



-- 
Guilherme Blanco - Web Developer
CBC - Certified Bindows Consultant
Cell Phone: +55 (16) 9215-8480
MSN: guilhermeblanco@hotmail.com
URL: http://blog.bisna.com
São Paulo - SP/Brazil

---

## #45746 — Rasmus Lerdorf — 2009-10-12T15:53:56+00:00

URL: https://externals.io/message/45744#45746 · In reply to: #45745

The real answer is that there is no Unicode support in the ereg
functions, and like it or not, the world is going Unicode.

-Rasmus

Guilherme Blanco wrote:
> It was fat, slow and everything that you can do with POSIX regex you
> can easily do with PCRE regex, which is faster.
> 
> It is a decision forever. Do not expect it to come on PHP 5.4 (?) or PHP 6.
> 
> Cheers,
> 
> 
> > […]

---

## #45747 — Robert Cummings — 2009-10-12T15:57:51+00:00

URL: https://externals.io/message/45744#45747 · In reply to: #45745

Guilherme Blanco wrote:
> It was fat, slow and everything that you can do with POSIX regex you
> can easily do with PCRE regex, which is faster.
> 
> It is a decision forever. Do not expect it to come on PHP 5.4 (?) or PHP 6.
> 
> Cheers,
> 
> 
> > […]

Just to add... I've found many regular expressions to evaluate an order 
of magnitude faster via preg than via ereg. The speed difference is well 
worth your time switching to preg.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP

---

## #45748 — Mark Krenz — 2009-10-12T16:08:56+00:00

URL: https://externals.io/message/45744#45748 · In reply to: #45745

Ok, let me first say that I have no problem with deprecating it in
favor of PCRE.  Being a heavy Perl developer too, I'm more used to PCRE
syntax anyways so it will be easier to only remember one syntax between
languages.

  Secondly, I've been using PHP since version 2 and as far as I can
remember ereg and the POSIX regex syntax has been in PHP for that long
if not as long as PHP has existed.

  Deprecating functionality in software is tricky enough when its a
minor function, but when its a major function in a major programming
language it is something entirely different.  Removing a function
because its fat, slow and doesn't have unicode support isn't enough of a
justification for removing a major function like ereg that is used in
probably 90% of all PHP applications. If there was some kind of
security issue that couldn't be fixed without removing it then that
would be different, but from what you said I don't think there is.

  PHP 6 already has some major changes to it that will affect many
people and slow its adoption.  Removing ereg might kill adoption of it
altogether or run the risk of PHP being forked.  

  My suggestion is that you delay removal of the function until PHP 7 or
even 8. This will give people a lot more time to learn about change and
most major app developers will find out about it and make the change.
Also, distributions that package PHP will have at least a couple minor
versions released prior to it being removed, which I think is VERY
important.

  Please, let's discuss this.

  Mark

On Mon, Oct 12, 2009 at 03:51:48PM GMT, Guilherme Blanco [guilhermeblanco@gmail.com] said the following:
> It was fat, slow and everything that you can do with POSIX regex you
> can easily do with PCRE regex, which is faster.
> 
> It is a decision forever. Do not expect it to come on PHP 5.4 (?) or PHP 6.
> 
> Cheers,
> 
> 
> > […]
> 
> 
> 
> -- 
> Guilherme Blanco - Web Developer
> CBC - Certified Bindows Consultant
> Cell Phone: +55 (16) 9215-8480
> MSN: guilhermeblanco@hotmail.com
> URL: http://blog.bisna.com
> São Paulo - SP/Brazil


-- 
Mark S. Krenz
IT Director
Suso Technology Services, Inc.
http://suso.org/

---

## #45750 — Mark Krenz — 2009-10-12T16:22:27+00:00

URL: https://externals.io/message/45744#45750

Just to clarify. You mean that with the changes you've made for
Unicode support in PHP 6, that current POSIX based ereg expressions will
not work the same?

On Mon, Oct 12, 2009 at 04:18:29PM GMT, Rasmus Lerdorf [rasmus@lerdorf.com] said the following:
> Lack of Unicode support is enough of a problem in that PHP6 will be all
> Unicode all the time, so these functions simply won't work as they are
> today.  It would take someone sitting down and figuring out how to
> emulate this stuff in a way that makes sense in a Unicode world for them
> to come back, and unless we get a volunteer to do that, they are gone.
> It is not a question of simply leaving in what we have today.  It
> technically won't work.
> 
> -Rasmus
> 
> Mark Krenz wrote:
> > […]
> 


-- 
Mark S. Krenz
IT Director
Suso Technology Services, Inc.
http://suso.org/

---

## #45751 — Pierre Joye — 2009-10-12T16:27:02+00:00

URL: https://externals.io/message/45744#45751 · In reply to: #45750

hi,


>
>  Just to clarify. You mean that with the changes you've made for
> Unicode support in PHP 6, that current POSIX based ereg expressions will
> not work the same?

The ereg functions cannot work with Unicode and can't be fixed without
rewriting them. Nobody likes to do it as pcre works just fine and has
many active maintainers (inside and outside php).

Cheers,
-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org

---

## #45754 — Mark Krenz — 2009-10-12T16:57:34+00:00

URL: https://externals.io/message/45744#45754 · In reply to: #45751

On Mon, Oct 12, 2009 at 04:27:02PM GMT, Pierre Joye [pierre.php@gmail.com] said the following:
> 
> The ereg functions cannot work with Unicode and can't be fixed without
> rewriting them. Nobody likes to do it as pcre works just fine and has
> many active maintainers (inside and outside php).
> 

  But I'm willing to bet that the majority of people are using ereg, not
PCRE.  I've known about PCRE in PHP for a while now, but I continue to
use ereg because I thought it had better support in PHP and that it was
the more "official" function. Guess I was wrong.  I'm sure I'm not the
only one who thought this.

  Again, this isn't a debate on which is better, I only want to STRONGLY
stress that I think its a big mistake to remove it in 6.0. If you wanted
to remove it in 6.0, you should have sent out the deprecated warning in
the whole 5.0 series, not just 5.3, which most people don't even use.
If nobody simply wants to do the work to make sure ereg is ready for PHP
6 and unicode support, then you are not doing your job.  I hate to call
it a job because I'm sure that you all enjoy doing PHP development, but
there are times when you have to bite the bullet and do the hard work
because its your responsibility to do so.

  If your only defense when the army of developers come banging at your
door about why ereg doesn't work anymore is that you didn't feel like
doing the work, PHP is going to lose a lot of support and you as
developers will lose a lot of respect.

  I feel like I shouldn't even have to tell you this, you develop a
programming language that is known by millions and runs web apps that
are used by the whole Internet.

  If ereg isn't ready yet then 6.0 should be delayed until it is ready.
Somehow I doubt that you'd have trouble finding volunteers to do the
work if they know what was at stake. There are probably a lot of people
out there perhaps even on this list that would love to show off their
chops by submitting some piece of code that will get them noticed. If
those of you that have responded are not willing to do the work, then
open it up for review by others. Send out a call for volunteers. Maybe
my inquiry will spark some interest. Imagine being able to say that you
were the one that saved the ereg function. 


-- 
Mark S. Krenz
IT Director
Suso Technology Services, Inc.
http://suso.org/

---

## #45756 — Lukas Kahwe Smith — 2009-10-12T17:08:33+00:00

URL: https://externals.io/message/45744#45756 · In reply to: #45754

Wow, you sure do assume a lot of things about PHP and its development  
community. I have never seen your name on this list before and (now I  
am assuming) do not know the state of development of PHP6 (as in that  
its more or less on halt until someone gets things going again).



> On Mon, Oct 12, 2009 at 04:27:02PM GMT, Pierre Joye [pierre.php@gmail.com 
> ] said the following:
> > […]
>
>  But I'm willing to bet that the majority of people are using ereg,  
> not
> PCRE.  I've known about PCRE in PHP for a while now, but I continue to
> use ereg because I thought it had better support in PHP and that it  
> was
> the more "official" function. Guess I was wrong.  I'm sure I'm not the
> only one who thought this.

Maybe try to substantiate that argument with a google code search or  
something. Personally I have seen quite the opposite, then again I  
have been actively encouraging people to use preg since about 5 or  
more years now.

> Again, this isn't a debate on which is better, I only want to STRONGLY
> stress that I think its a big mistake to remove it in 6.0. If you  
> wanted
> to remove it in 6.0, you should have sent out the deprecated warning  
> in
> the whole 5.0 series, not just 5.3, which most people don't even use.
> If nobody simply wants to do the work to make sure ereg is ready for  
> PHP
> 6 and unicode support, then you are not doing your job.  I hate to  
> call
> it a job because I'm sure that you all enjoy doing PHP development,  
> but
> there are times when you have to bite the bullet and do the hard work
> because its your responsibility to do so.

Our job for the most of us is to convince our boss's that the time we  
spend on company time is a worthwhile investment. There are of course  
people who work on PHP for fun in their spare time .. not sure if job  
fits the description for stuff they want to do. Anyways, that doesnt  
mean that either of the two mentioned "groups" of developers isnt  
doing a lot of boring tedious work for PHP as it is.

>  I feel like I shouldn't even have to tell you this, you develop a
> programming language that is known by millions and runs web apps that
> are used by the whole Internet.

Well the whole internet hasnt setup a donation box to pay for  
developers to work on stuff like this full time.

>  If ereg isn't ready yet then 6.0 should be delayed until it is ready.
> Somehow I doubt that you'd have trouble finding volunteers to do the
> work if they know what was at stake. There are probably a lot of  
> people
> out there perhaps even on this list that would love to show off their
> chops by submitting some piece of code that will get them noticed. If
> those of you that have responded are not willing to do the work, then
> open it up for review by others. Send out a call for volunteers. Maybe
> my inquiry will spark some interest. Imagine being able to say that  
> you
> were the one that saved the ereg function.


Well again an assumption .. no we do not have enough developers to do  
all the cool things we can think up and still fix bugs, document stuff  
etc. Feel free to step up .. but it makes no sense to start a php.net  
plea for help to get something ported to PHP6, where we will have a  
perfectly fine alternative.

regards,
Lukas Kahwe Smith
mls@pooteeweet.org

---

## #45758 — Christian Schneider — 2009-10-12T17:12:43+00:00

URL: https://externals.io/message/45744#45758 · In reply to: #45754

Mark Krenz wrote:
>   But I'm willing to bet that the majority of people are using ereg, not
> PCRE.  I've known about PCRE in PHP for a while now, but I continue to
> use ereg because I thought it had better support in PHP and that it was
> the more "official" function. Guess I was wrong.  I'm sure I'm not the

I guess that's exactly the reason why it is deprecated now: To indicate
that preg_* are the way to go.

>   Again, this isn't a debate on which is better, I only want to STRONGLY
> stress that I think its a big mistake to remove it in 6.0. If you wanted

As far as I understand ereg will be moved to a PECL-extension to keep it
around for people who can't switch.

>   If ereg isn't ready yet then 6.0 should be delayed until it is ready.

It probably never will be...

Don't get too worked up on this because (as far as I understand the
messages on internals) PHP 6 will not be a drop-in replacement for PHP
5.3 anyway. Hosters will have to configure it (like installing the
PECL-extension), developers will have to adapt some code.

I'm not sure if I'm right but that's how I understand the plans,
- Chris

---

## #45759 — Pierre Joye — 2009-10-12T17:12:47+00:00

URL: https://externals.io/message/45744#45759 · In reply to: #45754

> On Mon, Oct 12, 2009 at 04:27:02PM GMT, Pierre Joye [pierre.php@gmail.com] said the following:
> > […]
>
>  But I'm willing to bet that the majority of people are using ereg, not
> PCRE.  I've known about PCRE in PHP for a while now, but I continue to
> use ereg because I thought it had better support in PHP and that it was
> the more "official" function. Guess I was wrong.  I'm sure I'm not the
> only one who thought this.


Let me use another example to make you understand the situation.

I bought a car, which is great, I can repair it myself, can drive
anywhere I want, etc. 50 years later, the gaz reserve are out (bio gaz
etc. as well). I can "STRONGLY stress" anyone in the world to make my
car works with the new combustible, that won't help, my car simply
does not work with the new combustible. I have now two choices:

1. adapt myself and walk more (or buy a new car)
2. patch my car to work with the new combustible and provide it to the
cars developers so everyone else can enjoy the old cars for the next
decade.

Please note that I knew for years that I won't find gaz anymore at some point.

Shorter version: Topics have been discussed to death, move on, nothing to see.

Cheers,
-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org

---

## #45760 — Lukas Kahwe Smith — 2009-10-12T17:20:47+00:00

URL: https://externals.io/message/45744#45760 · In reply to: #45759

> Shorter version: Topics have been discussed to death, move on,  
> nothing to see.


actually in the spirit of how i documented the decision about  
ifsetor() [1] and the fact that contrary to "popular" opinion, the  
time of core devs is limited, it would be nice of someone would  
document the points raised by with "sides" about the deprecation of  
ereg in 5.3 and the removal in 6.0.

regards,
Lukas Kahwe Smith
mls@pooteeweet.org

[1] http://pooteeweet.org/blog/1200

---

## #45761 — Todd Ruth — 2009-10-12T17:25:22+00:00

URL: https://externals.io/message/45744#45761 · In reply to: #45756

This thread inspired me to google for a POSIX to PCRE converter.
I found a thread from this list from 2002:

http://marc.info/?l=php-internals&m=103625548402350&w=2

Ilia proposed a patch that would replace the ereg library
with code that would allow an ereg userland call to be
processed with the PCRE library (if I've understood the 
2002 post correctly).

I'm not complaining about dropping ereg nor taking a position
on whether many or few would complain about dropping ereg.
I just wanted to point out some past work that might be
applicable lest someone start from scratch.

BTW, thank you to all who have contributed to php.

- Todd

---

## #45762 — Derick Rethans — 2009-10-12T17:28:38+00:00

URL: https://externals.io/message/45744#45762 · In reply to: #45754

>   Again, this isn't a debate on which is better, I only want to STRONGLY
> stress that I think its a big mistake to remove it in 6.0. 

The ereg library doesn't handle unicode so it can simply not work.

> If nobody simply wants to do the work to make sure ereg is ready for PHP
> 6 and unicode support, then you are not doing your job.  I hate to call
> it a job because I'm sure that you all enjoy doing PHP development, but
> there are times when you have to bite the bullet and do the hard work
> because its your responsibility to do so.

Patches welcome.

Derick

-- 
http://derickrethans.nl | http://ezcomponents.org | http://xdebug.org
twitter: @derickr

---

## #45763 — Israel Ekpo — 2009-10-12T17:31:32+00:00

URL: https://externals.io/message/45744#45763 · In reply to: #45762

> 
>
> > […]
>
> The ereg library doesn't handle unicode so it can simply not work.
>
> > […]
>
> Patches welcome.
>
> Derick
>
> --
> http://derickrethans.nl | http://ezcomponents.org | http://xdebug.org
> twitter: @derickr
>
> --
> 
> 
>
>

PHP is the most popular web-development language and it would continue to
remain in that position for a very long time.

I don't think that if ereg is not longer bundled with PHP this will have any
effect in the number of PHP users.

There exists a very large number of PHP users around the world; however,
there is a significantly smaller and more miniscual number of people who
actually design and maintain PHP and its extensions.

It is important to stress that the PHP language is maintained by VOLUNTEERS
who are committed and dedicated to seeing that PHP continues to prosper
while maintaining high quality.

Change is something that most people struggle with.

As Pierre Joye suggested, just because there are lot of people driving
clunkers does not mean we have to keep using clunkers.

If there exist a faster, better and more efficient alternative, please
adapt.

Respect is reciprocal; please be nice to these volunteers because not only
are you not paying them but no one else is either.

Removing ereg from PHP might seem "Cold Turkey" but at this time that is the
wiser thing to do.

It's time for the clunker to go.

-- 
"Good Enough" is not good enough.
To give anything less than your best is to sacrifice the gift.
Quality First. Measure Twice. Cut Once.

---

## #45765 — Mark Krenz — 2009-10-12T17:36:23+00:00

URL: https://externals.io/message/45744#45765 · In reply to: #45759

On Mon, Oct 12, 2009 at 05:12:47PM GMT, Pierre Joye [pierre.php@gmail.com] said the following:
> 
> Let me use another example to make you understand the situation.
> 
> I bought a car, which is great, I can repair it myself, can drive

  Car analogies are seldomly an accurate portrayal to the situation.
This case is no different.

> Please note that I knew for years that I won't find gaz anymore at some point.
> 
> Shorter version: Topics have been discussed to death, move on, nothing to see.

  Whenever I bring up an issue like this with the PHP devs, I feel like
you guys never experience having to support PHP. Among other things, I
am the main sysadmin for my web hosting company and have been supporting
PHP since version 3 there. When 4.0 came out, I had to help people
change their code accordingly to fix any changes and so on with
subsequent versions. But I know that a lot of the people who write code
in PHP aren't on this mailing list and don't even look at the PHP
manual. A lot of causual developers simply copy code from other places.
You might say that its their fault for not keeping up with what they are
using and properly learning how to use it. I'd probably agree with you.

  But at the same time, PHP's ease of use has caused this.  Its easy for
anyone to sit down with no programming experience and figure out how to
process a form, often times by downloading someone else's code and
modifying it a bit. Then they learn more off of that and before you know
it they are writing stock market simulations.  I know a few people like
this. I'm guilty of this a bit too (although I've read through most of
the PHP documentation and a few books too).  I wonder how many of the
major apps that people use regularly use ereg and their developer don't
know about this change.

 So for the project developers to just say screw you, we're dropping
ereg in 6 and you can't do anything about it without giving a chance for
that information to make its way downstream is pretty cold and will lead
to a lot of angry people that maybe you don't have to deal with, but the
rest of us that run servers and maintain code have to deal with.

 Its easy for you guys on the list to say that you've known about this
or that, because you spend most of your time on PHP and are somewhat in
your own world. I spend a fair amount of time on PHP and I still didn't
know about this change until recently.


-- 
Mark S. Krenz
IT Director
Suso Technology Services, Inc.
http://suso.org/

---

## #45766 — Mark Krenz — 2009-10-12T17:47:00+00:00

URL: https://externals.io/message/45744#45766 · In reply to: #45758

On Mon, Oct 12, 2009 at 05:12:43PM GMT, Christian Schneider [cschneid@cschneid.com] said the following:
> Mark Krenz wrote:
> > […]
> 
> I guess that's exactly the reason why it is deprecated now: To indicate
> that preg_* are the way to go.

  Uh, really?  That's a rather cryptic way of communicating with people.
Since ereg was there before preg, a lot of people think that ereg is the
more official function.

  There are plenty of functions that were added into PHP to support lots
of different things, I never expected all of them to be well maintained
and wondered if I would use some function if eventually it would get
removed due to lack of support. preg was kinda like that for me.

> As far as I understand ereg will be moved to a PECL-extension to keep it
> around for people who can't switch.

 Then why doesn't it say this anywhere?  So long as the PECL ereg is
exactly the same, then I guess I don't have a problem.  However I still
think this is a change that should have been warned about further in
advance, people might not have PEAR turned on.

  Some brain dead webhosts out there just upgrade across major versions
of PHP without warning their customers and leave a lot of people's code
in broken states. If some major webhost that a lot of sites used did
this, you could suddenly find a lot of websites on the Internet not
working one day. And I think the blame would partially fall on the PHP
devs for not providing enough warning.

> > […]
> 
> It probably never will be...

  That's bullshit. Its not like Duke Nukem or something.  I've never
seen a major version of PHP take more than a couple years to release and
PHP 6 seems to be well on its way.  I expected it would be released
sometime in 2010.

> Don't get too worked up on this because (as far as I understand the
> messages on internals) PHP 6 will not be a drop-in replacement for PHP
> 5.3 anyway. Hosters will have to configure it (like installing the
> PECL-extension), developers will have to adapt some code.

 Major versions of PHP seldom are a drop in replacement. ie, you can't
just simply run yum upgrade php and hope for the best, you need to do
the extra code migration work.  However, removing ereg would probably be
the most siginficant changes to PHP ever from a code migration point of
view.


-- 
Mark S. Krenz
IT Director
Suso Technology Services, Inc.
http://suso.org/

---

## #45767 — Tomas Kuliavas — 2009-10-12T17:47:15+00:00

URL: https://externals.io/message/45744#45767 · In reply to: #45750

2009.10.12 19:22 Mark Krenz rašė:
>
>   Just to clarify. You mean that with the changes you've made for
> Unicode support in PHP 6, that current POSIX based ereg expressions will
> not work the same?

Expressions didn't work 1,5 year ago.

http://bugs.php.net/bug.php?id=44923

Maybe current PHP6-dev handles test code better, but bug report is still
open.

-- 
Tomas

---

## #45769 — Carl P. Corliss — 2009-10-12T17:55:25+00:00

URL: https://externals.io/message/45744#45769 · In reply to: #45756

Lukas Kahwe Smith wrote:
[snip]

> 
> 
> > […]
[snip]

> > […]
> 
> Maybe try to substantiate that argument with a google code search or 
> something. Personally I have seen quite the opposite, then again I have 
> been actively encouraging people to use preg since about 5 or more years 
> now.

Code Search of: "eregi?(_replace)?\( lang:php" shows ~123,000 results
Code Search of: 
"preg_(filter|grep|last_error|match_all|match|quote|replace_callback|replace|split)\( 
lang:php" shows ~374,000 results

Looks like preg_* functions are used more often than ereg* functions to 
me...


Cheers!,

--
Carl

---

## #45768 — Mark Krenz — 2009-10-12T17:55:48+00:00

URL: https://externals.io/message/45744#45768 · In reply to: #45756

On Mon, Oct 12, 2009 at 05:08:33PM GMT, Lukas Kahwe Smith [mls@pooteeweet.org] said the following:
> Wow, you sure do assume a lot of things about PHP and its development  
> community. I have never seen your name on this list before and (now I  
> am assuming) do not know the state of development of PHP6 (as in that  
> its more or less on halt until someone gets things going again).

  I've never seen your name before, but I've been using PHP for a while.
In other words, there are lots of people involved and affected by this,
far more than any of you seem to realize as indicated by your comments.

> Maybe try to substantiate that argument with a google code search or  
> something. Personally I have seen quite the opposite, then again I  
> have been actively encouraging people to use preg since about 5 or  
> more years now.

  Been using PHP since 1997 (version 2). Been a sysadmin at 3 places
that all have some PHP use, have been a paid developer on a major
PHP based project that I didn't even write, but contained over 130,000
lines of PHP code. Written by someone with more experience than me.
I've looked at and even modified PHP code for countless open source
projects.  I've read books and lots of documentation on PHP.  Of all
that, I have seen very little use of the preg functions.  Some people
use it sure, but it is by no means the standard.  And obviously from
what other people are doing, I'm not alone. Its you guys that are in the
minority here.

> Well the whole internet hasnt setup a donation box to pay for  
> developers to work on stuff like this full time.

  Heh, Its not the job of the internet to take donations, that's the job
of the people running the PHP project, but I don't see any mention of
donate on the PHP website. It always seemed from the outside like Zend
somewhat supported the project.


-- 
Mark S. Krenz
IT Director
Suso Technology Services, Inc.
http://suso.org/

---

## #45770 — Chris Stockton — 2009-10-12T18:14:02+00:00

URL: https://externals.io/message/45744#45770 · In reply to: #45765

Hello,


>  Whenever I bring up an issue like this with the PHP devs, I feel like
> you guys never experience having to support PHP. Among other things, I
> am the main sysadmin for my web hosting company and have been supporting
> PHP since version 3 there. When 4.0 came out, I had to help people
> change their code accordingly to fix any changes and so on with
> subsequent versions.
> .. snip ...
>  So for the project developers to just say screw you, we're dropping
> ereg in 6 and you can't do anything about it without giving a chance for
> that information to make its way downstream is pretty cold and will lead
> to a lot of angry people that maybe you don't have to deal with, but the
> rest of us that run servers and maintain code have to deal with.

Just because you did not find the information does not mean it was
unavailable. Assuming developers are saying "screw you" is just
ignorant. No one says you have to upgrade to PHP6 the moment it is
available. you could run PHP5 another 10 years if you choose. If you
choose to go through whatever measures you find necessary then no one
is at fault except for you. Many web hosting companies waited until
after PHP4 was entirely deprecated to upgrade to PHP5, and some,
likely still run PHP4 on some servers for customers to stubborn to
upgrade.

Your assumption of responsibility I find incorrect, your general
approach to this discussion I find distasteful. If it bothers you this
much put a patch out, that can be discussed and perhaps applied
depending on the consensus.

-Chris

---

## #45772 — Mark Krenz — 2009-10-12T18:20:55+00:00

URL: https://externals.io/message/45744#45772

On Mon, Oct 12, 2009 at 05:34:08PM GMT, Olivier B. [php-dev.list@daevel.fr] said the following:
> And as far as I know, using ereg_* function is discouraged in the 
> documentation since PHP 4, 10 years ago, no ?
> 

  Discouraged, no.  From looking at archive.org, it looks like there has
been this note in the ereg docs since 2002:

Note: `preg_match()`, which uses a Perl-compatible regular expression
syntax, is often a faster alternative to ereg().

  But that is just a note. Its not saying that preg is the best way to
go because ereg will be removed.  And there is no version of that page
on archive.org that contains the deprecation warning.  So its newer than
June of 2008.  I suspect its been in there since mid 2009, which is
hardly enough time.

  You really need to allow time for the change to make its way through
all the support channels.  PHP is not a small project anymore, but you
guys are treating it like one.

  Books need to be revised to tell people to use preg_match, websites
with tutorials need to be updated and so on.  You can't just make a
change like this overnight and hope that the PECL function will take
over.

 This is what you call alienating your users.


-- 
Mark S. Krenz
IT Director
Suso Technology Services, Inc.
http://suso.org/

---

## #45773 — Tomas Kuliavas — 2009-10-12T18:34:02+00:00

URL: https://externals.io/message/45744#45773 · In reply to: #45769

2009.10.12 20:55 Carl P. Corliss rašė:
> Lukas Kahwe Smith wrote:
> [snip]
>
> > […]
> [snip]
>
> > […]
>
> Code Search of: "eregi?(_replace)?\( lang:php" shows ~123,000 results
> Code Search of:
> "preg_(filter|grep|last_error|match_all|match|quote|replace_callback|replace|split)\(
> lang:php" shows ~374,000 results
>
> Looks like preg_* functions are used more often than ereg* functions to
> me...

 `preg_quote()` and `preg_last_error()` are support functions. They are used
together with other pcre functions. You double some search results.

If you have to support something, it is not about statistics. Even 1% is
important. Before you use statistics against something, remember that
statistics can be used against you too. Everyone of us is one in seven
billion. Any person is just 0,000000014% in Earth statistics.

-- 
Tomas

---

## #45774 — Lukas Kahwe Smith — 2009-10-12T18:36:08+00:00

URL: https://externals.io/message/45744#45774 · In reply to: #45766

> > […]
>
>  That's bullshit. Its not like Duke Nukem or something.  I've never
> seen a major version of PHP take more than a couple years to release  
> and
> PHP 6 seems to be well on its way.  I expected it would be released
> sometime in 2010.


Uhm, please keep your language under control.

Anyways PHP6 has been delayed quite a few times, which is why PHP 5.3  
was released to get a lot of the PHP6 non unicode features into the  
hands of users earlier. Anyways if at all .. PHP6 will come out late  
2010, but I think the first stable release will not come before 2011,  
meaning that there will be around 2 years between it being marked  
deprecated in a stable release and it disappearing in the latest  
stable release. Chances are high that the PHP5 tree will still be  
actively maintained for a few years there after and that the big  
libraries will not drop PHP5 support until a few years as well, so for  
most users they will have about 3-5 years to adapt. The rest are  
people who want to be on the bleeding edge and those users usually  
write their own code to be bleeding edge too.

So relax and again if you feel that your paying customers will suffer  
too much, pay someone to write the code.
Furthermore, if you care about PHP, you might want to register for a  
wiki account and write up that summary about this discussion, so that  
we can spare us starting this discussion at zero again in the future.

Thanks and have a nice day.

regards,
Lukas Kahwe Smith
mls@pooteeweet.org

---

## #45775 — Lukas Kahwe Smith — 2009-10-12T18:42:37+00:00

URL: https://externals.io/message/45744#45775 · In reply to: #45773

> 2009.10.12 20:55 Carl P. Corliss rašė:
> > […]
>
> `preg_quote()` and `preg_last_error()` are support functions. They are  
> used
> together with other pcre functions. You double some search results.
>
> If you have to support something, it is not about statistics. Even  
> 1% is
> important. Before you use statistics against something, remember that
> statistics can be used against you too. Everyone of us is one in seven
> billion. Any person is just 0,000000014% in Earth statistics.

Puh, I think this was a valid attempt at putting things closer to  
numbers rather then assumptions. Mark's claim was that ereg is being  
used more than preg and I think these stats do put some doubt on that  
claim, even though it should also be noted that there are several ereg  
using functions that are not prefixed with ereg.

regards,
Lukas Kahwe Smith
mls@pooteeweet.org

---

Next page: https://externals.io/message/45744.md?page=2
