Author |
Message |
alien73
Involved
![Involved Involved](modules/Forums/images/ranks/4stars.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Sep 15, 2008
Posts: 352
|
Posted:
Sun Sep 27, 2009 10:09 am |
|
I noticed the function ergi() is still being used in core which is fine for those not using php 5.3.0 +
ereg() — Regular expression match
Note: As of PHP 5.3.0 the regex extension is deprecated in favor of the PCRE extension. Calling this function will issue an E_DEPRECATED notice. It has been removed completely in Php 6.
Note: preg_match(), which uses a Perl-compatible regular expression syntax, is often a faster alternative to ereg(). |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
Site Admin
![](modules/Forums/images/avatars/Dilbert/Dilbert_-_Dogbert_King.gif)
Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania
|
Posted:
Sun Sep 27, 2009 10:58 am |
|
We are aware. It still works in 5.3+ you just need to suppress the deprecated warning. |
_________________ "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
alien73
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Sep 27, 2009 11:08 am |
|
We shouldn't have to suppress warnings but rid of them with the proper function that works will all versions of PHP like preg_match() |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Sep 27, 2009 11:20 am |
|
As i said we are aware and when time permits we will resolve the issue. ereg() still works in all stable releases of PHP, and all errors/warnings/notices should be suppressed on a "live" site. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
Site Admin
![](modules/Forums/images/avatars/0c0adf824792d6d341ef4.gif)
Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Sun Sep 27, 2009 11:23 am |
|
alien73, just another bit of history... we were made aware of this just a week or so before our code freeze. Too much work to pull int 2.4. Its in Mantis and will be worked. |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
alien73
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Sep 27, 2009 11:29 am |
|
I brought it up because I will using the function in Alien Cart(tm) but then realized after not use it.. I then got curious and did some code browsing of the core...
No pun intended. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Sep 27, 2009 11:32 am |
|
We could have as much as 639 instances of the ereg functions so hopefully you can understand the magnitude... ![Wink](modules/Forums/images/smiles/icon_wink.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
Site Admin/Owner
![](modules/Forums/images/avatars/45030c033f18773153cd2.gif)
Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Sun Sep 27, 2009 11:41 am |
|
And, for the immediate future, we are still 4.x based. It's on our list as has been mentioned as well as some others. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
alien73
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Sep 27, 2009 2:06 pm |
|
I'm full ledge coding right now and studying the new ways along the way... It's a function I needed but after looking into it I decided to not use it since preg_match() will work with all "current" supported releases of PHP. I had no idea this was mentioned before.
Keep up the great guys... |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
meotoo
Hangin' Around
![](modules/Forums/images/avatars/544eaead4a8c4820668b3.png)
Joined: Aug 04, 2009
Posts: 36
|
Posted:
Tue Sep 29, 2009 12:16 pm |
|
some time ago i've posted a ereg() replacement function which just a wrapper to preg_match(), isn't that enough? however there may was something wrong im not aware of with my function since i didn't get reply regarding that function post...
whatever, IMHO it does not matter if nuke uses 2, 639, or 20000 instances of ereg(), since you can get rid of all those deprecated warnings in two seconds by using the sed tool to replace them..(just can't resist to say it, im quite sure everything i can say on the matter all you guys are well aware of it already)
gretz. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Sep 29, 2009 1:38 pm |
|
The main issue is that once something is labeled "deprecated" it can be removed at any time ![Smile](modules/Forums/images/smiles/icon_smile.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
jakec
Site Admin
![](modules/Forums/images/avatars/502a2d1345d88a86ddb4a.png)
Joined: Feb 06, 2006
Posts: 3048
Location: United Kingdom
|
Posted:
Tue Sep 29, 2009 1:40 pm |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
meotoo
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Sep 29, 2009 2:01 pm |
|
Yes Jakec, that post.
@Raven:
Yes, most of the times.. but note it was already labeled "deprecated" long ago i'll probably fix my nuke install once i notice my site does not work anymore because my hosting provider updated to php6 without letting know its customers.. =) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Sep 29, 2009 4:03 pm |
|
I wouldn't worry about that since PHP 6 isn't even released yet. ![Wink](modules/Forums/images/smiles/icon_wink.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Sep 30, 2009 7:57 pm |
|
meotoo wrote: | some time ago i've posted a ereg() replacement function which just a wrapper to preg_match(), isn't that enough? however there may was something wrong im not aware of with my function since i didn't get reply regarding that function post... |
I don't understand what you mean as Palbin had an on-going discussion with you on that thread. My turn to
Quote: | whatever, IMHO it does not matter if nuke uses 2, 639, or 20000 instances of ereg(), since you can get rid of all those deprecated warnings in two seconds by using the sed tool to replace them.. |
Maybe for many, but not for all as I believe some arguments may not be exactly equivalent... I said "may not be". We have to consider ereg(), eregi(), ereg_replace(), etc. I'd rather make sure each and every one of the changes are reviewed... |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
meotoo
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Sep 30, 2009 8:13 pm |
|
montego wrote: | I don't understand what you mean as Palbin had an on-going discussion with you on that thread. My turn to |
read carefully again what i wrote..("reply regarding that function") of course i had a little discussion with Palbin regarding other things.
montego wrote: | Maybe for many, but not for all as I believe some arguments may not be exactly equivalent... I said "may not be". We have to consider ereg(), eregi(), ereg_replace(), etc. I'd rather make sure each and every one of the changes are reviewed... |
Well, the helpfulness of a wrapper function is that shouldn't be reviewed every place where the "child" function is used, while the wrapper itself is written on a bugfree fashion, which shouldn't be dificult for a too simple function as ereg* is. ![Wink](modules/Forums/images/smiles/icon_wink.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Sep 30, 2009 8:19 pm |
|
I am not criticizing your coding one bit as I am sure it works just fine. I just prefer to fix the issue rather than putting my thumb into the dike... and since we have plenty of time before 6.0 is a general release reality, we'll have this fixed in time. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
meotoo
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Sep 30, 2009 8:38 pm |
|
montego wrote: | I am not criticizing your coding |
You can, if you want. no problem
montego wrote: | as I am sure it works just fine. |
don't put your hand on fire about that.. i wrote that function in two minutes and i didn't even tested it myself, (by that reason i thought it may was just buggy by not getting reply about it)..
I am not suggesting either you guys should use my wrapper and forget the rest, at all. i put that function here and if someone whats to use it he is free to do so, else no problem - of course. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|