PHP4 PHP5 Code Switch at Runtime

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Darren996
Forum Newbie
Posts: 2
Joined: Tue May 13, 2008 8:53 am

PHP4 PHP5 Code Switch at Runtime

Post by Darren996 »

Hi,

I'm running a small site with Joomla. I'm using a component that needs php4 but I'm need php5 for another component. I'm getting a warning on deprecated function calls but I don't own the php.ini since it's a hosting service.

How would you know at run time which version of PHP was running so I can just use a different class or file to avoid the warning?

Thanks,
Darren
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: PHP4 PHP5 Code Switch at Runtime

Post by onion2k »

Darren996
Forum Newbie
Posts: 2
Joined: Tue May 13, 2008 8:53 am

Re: PHP4 PHP5 Code Switch at Runtime

Post by Darren996 »

Ah! Thanks!
Post Reply