How did you guys become competent at PHP

I just used it for many years and then got a job as a PHP programmer; now its in my blood.

The best way I learn my PHP is by starting a small project and continually trying to improve it. I am many times pacing the sidewalks outside thinking of a better way to handle what I want to do, often times it’s something very small that bothers me. It can be exciting, but sometimes if I wrestle with my mind too much even after looking at my references I consult someone more experienced than I without being a nag if possible (only a few questions), and that other perspective can really get the choo choo engine roaring.

Practice is the most important in my opinion. Collecting knowledge doesn’t do me much good if I don’t know how to make use of it. Seriously, start some small personal projects and you’ll improve very fast.

I’m shocked how little I know after a few years of PHP, I may just be a slow learner too. But it just seems to never end what you can learn and improve on, and I do write and read about PHP all the time, sometimes 5 extra hours a day in my free time. This is my first language though, I don’t have a C/VB background so all these concepts are new to me like Patterns and Objects.

Hello,

The first thing I did was buy the book PHP & MySQL for dummies. I recommend that for starting out because it can be accessed anywhere, even if you’re not near a computer. It has examples, and descriptions of the main functions, principles, and concepts you will be using through out your PHP programs.

After that I had a pretty good understanding of what PHP does, what PHP was mostly used for, and how to use it. From there I just started experimenting and reading PHP tutorials from http://www.pixel2life.com. Now, 10 years later there’s very little I don’t have experience with when it comes to PHP. I’ve created database handlers, template engines, CMS’s, Frameworks, shopping carts, even tested out the socket functions of PHP and made a chat server.

In short the best way to really master PHP is to keep using it and creating problems and then solving them.

Well, I got a job.

When you are just making websites at home for fun or for few bucks, you have little motivation to become more effective and competent programmer.

Pressure of deadlines and unexpected situations that you’ll encounter will make you more flexible, you will realize that reinventing the wheel is pointless (that’s why we have libraries and frameworks) and you will have more time to focus on quality of your application logic.

There are many tutorials you can use to learn about PHP and how to execute scripts on your server. You can also try professional Web Design companies that offer training services. I learnt with one and since then, I have used PHP as an alternative to Perl. I now work as a freelance developer.

I started a great PHP tutorial for people wanting a gentle introduction:

http://www.stedetroisi.com/tutorials/php-made-easy

There are probably more books on PHP than PHP developers. There are also schools like the Learning Tree. Lets not forget colleges and universities. Heck even high school teaches programming today.

The biggest problem today is supply. There is not enough interest in people wanting to become developers worldwide compared to demand. People are either not interested, don’t like it when they learn it, or give up when they face reality in the business world. There are too many reasons to list.

  • Stede

you need curiosity and patience to become competent.
the more problems you encounter, the better chance of improving your skills

One way that I know would work is if you get a job as PHP programmer. I observed people with minimum programming skills and a college degree can achieve reasonable PHP programming skills by working in a company as PHP programmers for about a year. Usually, one would be able to do 2 to 3 PHP projects during this period.

I learned on my own, but I already knew ASP, ASP.Net, and Visual Basic. There is always something to learn in this field, and nobody knows everything. That is what makes programming so much fun.

Best thing to do is buy a book on the very basics of PHP programming so you will get to know what PHP is and does.

Then start a project, a large one and start building using basic PHP. This will help you get use to using php and how to control it.

After some time, buy another book on advanced php (OOP) and begin to learn that. Because you have learned the basics learning OOP will make it a bit easier to understand.

Another top tip, don’t rush. :slight_smile:

Like any language it takes a few years to really get good at it. Like others said you really need to throw yourself out there and program some stuff you are unfamiliar with.

IMO PHP is the easiest language out there and is notorious for helping beginner programmers develop bad habits. It happened to me and took me awhile to unlearn them. I would suggest starting with a a stricter language just to until you develop your “programming mind”.

I was going to say something to similar effect, but I figured it would be best to just let it slide, as deathshadow60 honestly seems to be rambling and incoherent for the sake of being rambling and incoherent.

It depends. I mean, obviously if that was a real code the programmer should be taken to the backroom with a pistol to put himself out of his misery.

However, you don’t always want to stop an include reading your data. For example if you have a object with certain properties, and inside the class definition you have a method which outputs a certain template file, then that file will want to be able to read those properties and use the methods.

If you’re worried about what’s inside your own files, chances are you need a better host or any knowledge of file permissions. Incorporating that into PHP is overkill (in my opinion), it’s like putting a cement mixer on the back of your car just incase the road is incomplete - your car (PHP) is just a small part of a bigger system (the server) which should be dealing with this stuff in the first place!

Stack Overflow has had a HUGE influence on my programming, even though I just came across it a few months back. The collective knowledge of the group is astounding and they talk about every programming language under the sun. From BrainF*ck to Golfscript and even low level languages such as Assembly.

As with any resource, you need to already have some knowledge before using it, otherwise you’ll ask stupid questions and get stupid answers.
http://www.doxdesk.com/updates/2009.html#u20091116-jquery Now I thought that was hilarious, and it’s not a real question, but lots of questions like that get asked anywhere there are people asking and answering questions. If you already know something, then you have the ability to weed out bad answers in the first place.

Off Topic:

Hey good luck with Python… if you notice any excellent Python resources you’ve used (books, sites, whatever), please add them to the old Python sticky in Perl, Python and other languages forum, since it’s about to get updated!

For a quick learning, check out this for your best help. http://www.w3schools.com/php/default.asp

Regards,

I agree, Go beyond your skill set gradually, that is, change your direction slightly but beyond your skills. This way you’ll get the best out of yourself.

Trial and error, really. My first actual programming was done in Javascript (with which I once build my old pseudo-database structure and made a horrendous Javascript-powered dynamic site). I wrote my first programming logic much earlier, though, at the age of 8 or so.

When I first started doing PHP, I really just wanted to do some includes. It quickly evolved, though, until I ended up building advanced content management systems with freakish RegEx and image generation. No idea how came from A to B, but I sure am looking forward to go to C and beyond.

Off Topic:

Yer right, I failed to mention disabling readfile, exec and other insecure functions using disable_functions in the php.ini

http://us2.php.net/manual/en/ini.core.php#ini.disable-functions

[ot]

Maybe you glossed over it (or I did) but you’re only trying to prevent re-execution of that one file? If an attacker has access to include it, they can readfile it as well. I don’t think your comparison with how Wordpress does things is necessarily all that strong. Not that restricting the visibility and/or scope of sections of your script isn’t a good thing; I wish more people would consider it, just for tidiness sake or, like yourself, to keep things separate that really should be kept separate.[/ot]

Ironically enough, I actually learned quite a lot from tutorials when I first started learning PHP. Why? Because most of them had bugs! If most of them had “worked” I wouldn’t have learned nearly as much as I did by trying to debug them so they would do what they said they would do.

After the initial entry, most of my learning has been on an “as needed” basis. I set a goal for myself and then work through the steps needed to get there. I like tearing apart various apps like WordPress, but I think I learn more by “reinventing the wheel”.

In my user profile’s About Me under Skillset, I have
Proficient? Compared to what?

By that I mean that compared to some of the gurus here at SitePoint my skills are like that of a struggling newbie. Yet to other members I may know more about something than they do. IMHO even though we all have our strengths and weaknesses, nobody knows everything about everything. And we can all help somebody no matter how we feel about our own level of skill.