juust ~ php oddities

Unordered list of one element
  • rss
  • begin
  • about
    • vcard
    • WTF is BroJesus
  • php scripts
    • flickr wp widget
    • google multi key serp tool, php script
    • gwt plugin
  • php classes
    • php pagerank class
    • fibonacci class
    • robots.txt parser php class
  • serp
    • serp dashboard wordpress plugin
  • services

replace_ereg

juust | 15/09/2009

Posix ereg which will not be included in PHP6 core, you can optionally include it in the install, otherwise you’d use pcre preg_match. In Wordpress, ereg is still used in the squirrelmail POP3 class (trunk), afaik wordpress as it is distributed up till now will fail if it tries to load the POP3-class with a standard PHP 6 install.

I don’t so much have a problem with that, there is not even a release date set for PHP6.

I was pondering more in general on backward compatibility and legacy function support, ereg serves as a nice example.

Does it make sense to make a plugin with general php patches ? A central plugin would make it easier for some coders (me of course) to check what functions are dropped, and update code without code breaks caused by updates of php or wordpress core.

So I don’t have to reinvent the wheel. Something simple like :

  1. if(!function_exist('ereg_replace') {
  2.     function ereg_replace($pattern, $replace, $source) {
  3.        return preg_replace("/". $pattern."/", $replace, $source);  
  4.     }
  5. }

Anyways, I’ll have to read about it some more I think.

Categories
php
Comments rss
Comments rss
Trackback
Trackback

« subversion bing api with php and simplexml »

Leave a Reply

Click here to cancel reply.

Recent Posts

  • Pagerank sculpting session
  • wish you were here
  • interesting : seo panel
  • availability test
  • Mayday

click me!
rss
Comments rss
Blog Directory
Web Developement Blogs - BlogCatalog Blog Directory
Listed in LS Blogs the Blog Directory and Blog Search Engine
Blog Flux Directory
joopita.com free web directory and search engine
design by jide
sitemap
17240 confirmed spam kills