[geeklog-devel] Regex functions in Geeklog

Tony Bibbs tony at tonybibbs.com
Mon Mar 8 12:33:18 EST 2004


Yep, an RC3 is out now.  I doubt you get the fixes in for the final 
1.3.9 release but we can try (Dirk, you have an ETA yet?).  Just send a 
note to geeklog-devel once you think you got it.

--Tony

Justin Carlson wrote:
> Is it ereg_replace or eregi_replace?
> I will assume that since this guy has been coding since `99 that it is just
> ereg_replace().
> 
> I could possibly make the adjustments.
> You guys have a RC getting ready to be put out right?
> 
> ----- Original Message ----- 
> From: "Tony Bibbs" <tony at tonybibbs.com>
> To: "Geeklog" <geeklog-devel at lists.geeklog.net>
> Sent: Monday, March 08, 2004 8:05 AM
> Subject: [geeklog-devel] Regex functions in Geeklog
> 
> 
> 
>>An anonymous coward wrote:
>>
>><snip>
>>I was looking through the Geeklog PHP code and saw it uses functions
>>like eregi and ereg_replace in places, when it should be using
>>preg_match or str_replace, which are much faster.  I've been coding in
>>PHP since '99 and I've benchmarked the preg and string functions against
>>the ereg functions and the ereg functions are always slower and should
>>never be used.  You should use strstr or stristr instead of ereg or
>>preg_match if you don't need a regular expression.  And you should use
>>str_replace instead of preg_replace or ereg_replace if you don't need a
>>regular expression.
>>
>>Please consider making these changes in future versions of the code.
>></snip>
>>
>>I've forward this to the list as an FYI.  This guy isn't saying
>>something we haven't heard before.  BTW, for anybody watching this list,
>>anonymously sent emails annoy me (and other developers I'm sure).  Use
>>geeklog-devtalk or geeklog-users for stuff like this.
>>
>>--Tony
>>_______________________________________________
>>geeklog-devel mailing list
>>geeklog-devel at lists.geeklog.net
>>http://lists.geeklog.net/listinfo/geeklog-devel
>>



More information about the geeklog-devel mailing list