Click to See Complete Forum and Search --> : PHP5 vs PHP4.3(.10): A beginners choice


ATS16805
08-28-2005, 11:37 PM
I'm quite new to PHP, at least when it comes to development. I have read the better part of Sams Teach Yourself PHP, MySQL, and Apache All in One, only having not finished it as i've stopped to take a closer look at some of the "Basic Projects", to try tweaking them for my own uses, etc, so i've actually only hit two of the nine projects therein. anyway, not to get totally side-tracked...

So, i've learned some, albeit very little, PHP 4.3 (i assume that's the proper shorthand term to reference it?).

I would bet that there is probably a thread here which covers this topic, but i couldn't come up w/ any good keyword combos to arrive at the info i seek. Maybe it's not been covered from my standpoint. And I also realize that this is a question of opinion, not necessarily of fact.

What i would like to know, now that i've got my feet wet, had an opportunity to play w/ settings in php.ini, encountered many errors and fixed them, etc,... should i install and start using PHP 5.x.x as soon as possible, or would i be better off continuing on my current path with PHP 4.3.10, and do the switch-over later?

my guess is that i'll get mixed opinions (if anyone bothers to reply), but maybe not... maybe the answer is obvious.

Weedpacket
08-29-2005, 04:43 AM
You might as well learn PHP5 from the beginning; the differences between the two that might stop scripts written for 4 working on 5 won't really show up until you're somewhat more advanced, and by then the 4.x series might already be obsoleted. Meanwhile, PHP5 has all sorts of little tweaks to its functions here and there that are the result of people really really wishing they were in PHP4.

At least, that's what I reckon. And I remember the transition from PHP3 to PHP4.

Elizabeth
08-29-2005, 08:52 AM
The only other comment I might add to Weed's post is that I think it somewhat depends on whether or not you will be hosting your own site. A lot of web hosts have been reluctant to upgrade to PHP5 for whatever reason (bc, waiting for any bugs out of 5, etc) so you might have some difficulty finding a host that offers PHP5.

ATS16805
08-30-2005, 12:21 AM
thanks for the input. so, i think what i'm hearing then... is i should go ahead and get into php5, and most likely, until i'm really advanced w/ it, i probably won't encounter anything that might be PHP5 specific enough to where i'll have any problems with my hosting providers? something like that? i mean, by the time i get far enough into php5, chances are, any reason for reservation will likely have by then disappeared. is that pretty much the long and short of it?

i've also seen posts where people had issues w/ the local installation "upgrade". any warnings or advice before i go and try to install/ upgrade?

Weedpacket
08-30-2005, 07:17 AM
Pretty much; playing on your own box you can of course have whichever version you like. If you are going to have stuff hosted and they're still on PHP 4, you may want to check what the manual says is supported in which versions. (For example, PHP5 has str_split(), but PHP4 does not; in such cases the manual will typically provide a PHP4-compatible workaround if one exists.)
Of course, you'll be studying the manual anyway; while researching for this post I discovered a function I didn't know about - and it's been there since 4.3.0....

ATS16805
08-30-2005, 07:26 PM
rock n roll. i'm glad i inquired. i'll probably install this weekend then. i definitely agree w/ you regarding the issue of referencing the manual. i know what you mean about the backwards (or forward?) compatibility of the functions listed. it seemes to always be well defined.

thanks again for the input.