GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   PHP Question (https://gfy.com/showthread.php?t=939390)

Jman 11-19-2009 01:00 PM

PHP Question
 
Moving an old site for a friend that was made in php4 and I was suggested to upgrade to php5.

How easy is this to do and how long should it take for a programer?

Small mainstream site.

ipolic 11-19-2009 01:12 PM

You say small mainstream site, but that depends how small. I think we need measurements here. What you think is small, someone else might consider big.

AIbenjamink 11-19-2009 01:14 PM

What are you thinking about upgrading, the PHP version on your server or your code?

Jman 11-19-2009 01:17 PM

Quote:

Originally Posted by AIbenjamink (Post 16567538)
What are you thinking about upgrading, the PHP version on your server or your code?

The code

Jman 11-19-2009 01:19 PM

Quote:

Originally Posted by ipolic (Post 16567534)
You say small mainstream site, but that depends how small. I think we need measurements here. What you think is small, someone else might consider big.

Can you hit me up on ICQ, this site is part of a huge worldwide company specialized in vacatoin resorts and I do not want to link their url on GFY.

Thanks

cyco_cc 11-19-2009 01:21 PM

I'd bet that 99+% of the code written for PHP 4 will work with PHP 5. IIRC (I don't really work with PHP, just .NET--don't hate), the main things added to PHP 5 was some actual OOP constructs that made sense and some syntactic sugar. I'm probably horribly understating the platform upgrade, but still, your procedural code is probably all going to work just fine in PHP 5.

There might be some functions that are deprecated but they'll still "work". Long story short, it's probably just a matter of upgrading the version of PHP your server is running.

Jman 11-19-2009 01:25 PM

Great info and thanks Benjamin for taking the time to chat with me on ICQ. Glad I made this post ;-)

AIbenjamink 11-19-2009 01:56 PM

Quote:

Originally Posted by Jean-Francois (Post 16567569)
Great info and thanks Benjamin for taking the time to chat with me on ICQ. Glad I made this post ;-)

Not a problem Jean-Francois, Good luck!

redwhiteandblue 11-19-2009 02:06 PM

Quote:

Originally Posted by Jean-Francois (Post 16567544)
The code

Are you saying that the code is written in PHP4 but the version running on the server is PHP5?

adendreams 11-19-2009 02:27 PM

Nice. good explanation...:thumbsup

ICQ : 567-816-270

HomerSimpson 11-19-2009 06:35 PM

Quote:

Originally Posted by Jean-Francois (Post 16567544)
The code

code is backward compatible
so no changes are really needed...

Jman 11-19-2009 06:46 PM

Quote:

Originally Posted by redwhiteandblue (Post 16567711)
Are you saying that the code is written in PHP4 but the version running on the server is PHP5?

Yup that is the case, again thanks y'all :thumbsup

GrouchyAdmin 11-19-2009 11:58 PM

As already mentioned, almost anything written halfway decently for PHP4 (Using superglobals, very primitive OOP, if at all, not relying on inherited variables) will work fine with PHP5 up through 5.1.x.

They've decided to do some rather stupid shit since like killing the only sane regex library in 6.x, so you may get a few deprecation warnings, but you probably won't need to worry until at least 2011 for that.

nation-x 11-20-2009 05:52 AM

Quote:

Originally Posted by GrouchyAdmin (Post 16568969)
As already mentioned, almost anything written halfway decently for PHP4 (Using superglobals, very primitive OOP, if at all, not relying on inherited variables) will work fine with PHP5 up through 5.1.x.

They've decided to do some rather stupid shit since like killing the only sane regex library in 6.x, so you may get a few deprecation warnings, but you probably won't need to worry until at least 2011 for that.

yeah... I used ereg alot. Another thing to mention is that some developers had a bad habit of using short tags which are disabled by default in php 5

<? <-- short tag
<?php <-- long tag


All times are GMT -7. The time now is 03:04 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123