Welcome to WebmasterWorld Guest from 54.146.221.231

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Migrating to PHP6

eregi, ereg, ereg_replace, eregi_replace functions

     
7:30 pm on Nov 2, 2009 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member henry0 is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Apr 19, 2003
posts: 4388
votes: 2


FYI,
Going from 5 to 6 might call for a few more in depth script twists than 4 to 5!

As per the manual those functions
eregi, ereg, ereg_replace, eregi_replace
are deprecated since 5.0.3 and will be removed from PHP6

So in most cases if you use any of them you will need changing it by a preg_match() or a preg_replace()

Make a full scope search for the ereg family
and you could be in for a surprise

If you use PMA then hope for an updated PMA without eregi

If you use class.phpmailer.php
use the newer one (most recent is 5.1)

If you Flash library uses write.id3v2.php
then we must hope for a new release, so far it still uses eregi

Do you have more on the topic?

7:30 pm on Nov 3, 2009 (gmt 0)

Administrator

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 31, 2003
posts:12533
votes: 0


Not really. I'm just thankful I never did use the ereg* functions. I started off using the perl-compatible regular expression engine as soon as I realized it was bundled with PHP.
7:37 pm on Nov 3, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Oct 22, 2004
posts:1082
votes: 0


Other in list are removal of register_globals
magic_quotes
safe_mode

Any idea of php6 release timeline?

10:40 am on Nov 5, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Oct 22, 2004
posts:1082
votes: 0


There is one post on php website for depreciated functions in 5.3

php 5.3 Migration [php.net]

Also there was one interesting article on Linux Magazine on getting ready for php6 here is Link [linux-mag.com]

10:55 am on Nov 5, 2009 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member henry0 is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Apr 19, 2003
posts: 4388
votes: 2


A keeper, thanks!
12:29 pm on Nov 5, 2009 (gmt 0)

Administrator

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 31, 2003
posts:12533
votes: 0


I have run into some show-stoppers in PHP 5.3 stable, including PRE-INIT queries with mysqli for which a bug was reported and patched in 5.3.2 DEV, which I had to pull from the snaps to get a domain running properly on a development site. IMHO, I would let 5.3 mature a bit more before using it for a live implementation. Use that migration guide for sure. There are other areas that may impact you.

I have a PHP 6 install too but haven't had as much time to dedicate to testing on it. I was actually a little surprised when they first announced the 5.3 branch but there must have been something in developer discussion that prompted the interim release.