IWETHEY v. 0.3.0 | TODO
1,095 registered users | 1 active user | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New I'm trying to learn PHP
I've been doing too much "not so simple" stuff with my websites lately, and I can no longer afford not to know PHP. Consequently I've decided to learn it.

The trouble is that there are apparently quite a few differences between PHP 4 and PHP 5, and all the books I can find these days seem to be for PHP 5. That said, my understanding is that PHP 4 is still in widespread use (and is in fact what the server hosting ubersoft.net uses). THAT said, it seems that learning PHP 5 would be a lot more useful in the long run.

What I'm wondering is, if I decided to learn PHP 5, how applicable would that be to PHP 4? It seems to me there would be a fair amount of carry-over... I mean, it's still the same language, isn't it?

Oh... and hi all! I'm still alive. Just unemployed.
"We are all born originals -- why is it so many of us die copies?"
- Edward Young
New Yay! and Suck!
Good to hear from you. Not so good to hear about the employment deficiency.

So the difference between PHP 4 & 5 ... There's a lot of OO functionality built in to 5 that you had to do yourself in 4. You can accomplish a lot of the same things with less syntax, because whole classes that were parts of common toolkits are now language constructs. I think I'm fairly safe in saying that if you learned 4, most anything you write will work in 5.

The best documentation is the [link|http://www.php.net/manual/en/|online manual]. I'm convinced PHP's popularity is due in large part to the quality of the manual. Chapters 18 & 19 (Classes and objects PHP 4 / 5) sum up most of the difference between the two. Each function (not just in those two chapters) has a reference at the top to which version it appeared in.

You'll probably want some tutorials to get started. There's a good selection on the [link|http://www.php.net/links.php|links page], though I no longer have any idea which ones are current and good.
===

Purveyor of Doc Hope's [link|http://DocHope.com|fresh-baked dog biscuits and pet treats].
[link|http://DocHope.com|http://DocHope.com]
New good to hear from you, hope you find employment
Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free american and do not reflect the opinions of any person or company that I have had professional relations with in the past 50 years. meep
New Re: I'm trying to learn PHP
[link|http://www.php.net/manual/en/migration5.incompatible.php|PHP.net incompatible changes between 4 and 5] plus the big changes to the way the object system works that Drew mentioned.

In the end, the changes probably won't have much impact on a simple web site. But if your building a big web application, the better OO in PHP 5 gives it a big advantage.

Hope you find something that pays.

Jay
New Thanks for the response so far...
... if the difference is negligible for little code snippets on a web site, but PHP5 is properly object-oriented, then I guess it makes more sense to learn PHP5. I suspect that by the time I learn enough to do anything useful that is unique to PHP5, it will be used more often.
"We are all born originals -- why is it so many of us die copies?"
- Edward Young
New Stay simple until you need it
I hadn't seen that migration page Jay linked. The differences are even smaller than I thought.

Unless:
  1. you are already fairly fluent with OO theory
  2. you plan on looking for work as a programmer, so will be learning OO theory
you're not going to see much benefit from getting into it early.

My recommendation is learn the syntax, learn the functions, but only what you need to maintain your site. By the time you know enough to start getting all "enterprisey" you'll want to throw out your early efforts anyway.
===

Purveyor of Doc Hope's [link|http://DocHope.com|fresh-baked dog biscuits and pet treats].
[link|http://DocHope.com|http://DocHope.com]
New Everyone's been on the money so far.
I haven't done any work in PHP5, but I earn my living in PHP4, including some hairy OO stuff at the limits of the language.

You can get a lot done staying almost completely away from objects. I've seen three whole website infrastructures - all completely different - using only functions, or objects in a very simple sense. It's really only when you get into the quirks of references that you will have issues between 4 and 5, but if you don't know what they are, then you'll be fine for quite a while. The language masters spent a lot of time trying to avoid surprises for those moving lots of existing code from 4 to 5.

And whatever structure you create to look after things for you, be prepared to rewrite it eventually - perhaps twice - when you have more experience at creating that sort of thing. That doesn't include wholesale changes before you get the first one working. :-)

Wade.
"Insert crowbar. Apply force."
New No help with PHP here. But,...
glad to see you stop by.

You are not and were not [link|http://z.iwethey.org/forums/render/content/show?contentid=260532|forgotten].

Good luck in finding employment, Chris!
Alex

When fascism comes to America, it'll be wrapped in a flag and carrying a cross. -- Sinclair Lewis
New Re: I'm trying to learn PHP
Welcome back. Have you tried Wikibooks?

[link|http://en.wikibooks.org/wiki/Programming:PHP|http://en.wikibooks....i/Programming:PHP]

It is a good way to start to learn PHP and it has links to various web sites on PHP that you may find useful and some forums you might ask questions on. Not to mention PHP editor links that make your programming of PHP a lot easier.

I hope you find the Wikibook useful, as you will start out with a simple "Hello World" program and work your way up to objects and other advanced topics. Go at a slow pace at first, don't get into objects right away. Just learn the basics, and then learn the differences between PHP4 and PHP5 later. Learn how to print text, generate HTML code, do control loops, IF statements, arrays, comments, etc the basic stuff first. I am sure that you will do great with it, given your past experience.

Good luck on your job search.




"It is of interest to note that while some dolphins are reported to have learned English -- up to fifty words used in correct context -- no human being has been reported to have learned dolphinese."
Carl Sagan (1934 - 1996)




[link|http://district268.xormad.com|I am from District 268].
     I'm trying to learn PHP - (cwbrenn) - (8)
         Yay! and Suck! - (drewk)
         good to hear from you, hope you find employment -NT - (boxley)
         Re: I'm trying to learn PHP - (JayMehaffey)
         Thanks for the response so far... - (cwbrenn) - (1)
             Stay simple until you need it - (drewk)
         Everyone's been on the money so far. - (static)
         No help with PHP here. But,... - (a6l6e6x)
         Re: I'm trying to learn PHP - (orion)

A free PhD thesis anytime someone wants to start 'measuring'.
89 ms