Many people tend to become very complacent once they’ve learned PHP. There doesn’t seem to be any compelling reasons to learn anything else, right? Wrong. PHP can be very restricting for a number of reasons. For one, it is designed to be used for web-based processing. You’d have a very hard time writing, say, a 3D game in PHP, or dealing with anything that requires speed (the PHP interpreter is not the fastest thing in the world). This is where you’d be best to learn another language. Being the weapon of choice in the industry, C or C++ would probably be preferable. There are plenty of free tutorials out there that will get you on your way, including:
If you know PHP fairly well, then the syntax of C and/or C++ shouldn’t give you much trouble at all. Just remember that C doesn’t have the automatic type “coercion” that PHP has (ie, the ability for a variable of a certain type to be automatically converted to be another type, as needed). You also need to be careful because once again, unlike PHP, C lacks the “safety net” which PHP will often throw out for you if you get something wrong. Error checking and prevention are essential if you’re planning on writing production-quality software using C. It all sounds like something of a bother, doesn’t it? So why do people write in C? Well, it’s fast, primarily, and it is more versatile than PHP in many things. A quick Google search will turn up the huge numbers of C libraries available, to do everything from 3D graphics to network sockets to hardware interaction.