Link to home
Start Free TrialLog in
Avatar of f_o_o_k_y
f_o_o_k_yFlag for Poland

asked on

Ho to use global alias function?

Hello,
I have apache server with PHP 5.2 with many obsolete applications on it.
We must upgrade to PHP 5.3

I know there is no more ereg() function with bunch of other functions.

I need to create global alias for my function witch will simulate ereg() function
Something like  "Facade pattern" but global for all application.

Is there some way to do it?
Best Regards
FooKy

Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Why do you have to upgrade to 5.3?  Most hosting companies never upgrade a server with user accounts on it so they Don't break their users code.  With hosting companies, you have to change servers to get a newer version of PHP and most other things.

Even if it were possible to 'alias' the ereg() function, a typical problem is that PHP 5.3 is simply pickier about many errors and users find that things that were ignored as warnings before now show up on the screen as errors.  Is this a Linux or Windows server?
I don't understand the question - replace ereg functions with preg functions
ASKER CERTIFIED SOLUTION
Avatar of Derokorian
Derokorian
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of f_o_o_k_y

ASKER

Hello,
my bad. I misunderstood the notice from php.net
Derokorian you are right.

Best Regards
FooKy