views:

736

answers:

15

I've been using PHP ever since I got a job in web development (late last year).

I currently have a desire to learn something new. I was considering Python.

Has anyone else been in this state of mind, and what were their choices? Did they end up learning a new language, or did they rethink their PHP approach for a fresh breath of PHPness?

I don't want to use .net or coldfusion for licensing issues and I'm not a fan of frameworks (yet).

Update

Thank you very much for your responses. It's great to see so many helpful people out there! If I do go down the Ruby or Python road, I hope you don't mind answering some questions later on :).

Update

I have since became a fan of a certain framework, Kohana, and it has given me a fresh breath of PHP. I intend to give c++ a look soon, to get some familiarity with a compiled language.

+10  A: 

Assuming that you're on web development I recommend you to try to Ruby On Rails, also Python, with Django will be good, it's always useful to learn new stuff...

CMS
except that he explicitly said he doesn't like frameworks! P.S. I'm a fan of django
hasen j
Then Python + web.py!
Alex Ati
A: 

Go for Python, its a great choice. Considering the features ver 3.0 has put in it, it's a beautiful language to put your hands on.

You can also try Ruby on Rails, if you are interested in some rapid yet powerful web development on the tracks of web 2.0.

Enjoy coding! :-)

Mohit Nanda
+24  A: 

Since PHP is an interpreted language, I'd like to suggest that you learn a compiled language. How about C? It is very general and it will give different insights into programming. It is a language which is central in programming tradition. It is very hard core and you will learn a lot about how computers really work.

I would also suggest that you attack it from the classic Kernighan & Ritchie book. It is very good. And short as well.

Guge
Thanks for honoring my answer so much. It shows good form to look into something that is very different from what you do. Corbin March's answer is also very good, and one I will try to follow myself.
Guge
No worries, I'm glad you took the time to give some good input. This one seemed like the path I want to take (outside of interpreted) so I gave it the 'answer' tick. Happy coding!
alex
Not to mention that PHP itself is written in C, so if your job ever calls for a custom module, knowing C will save you a ton of time.
Nathan Strong
Moving from PHP to C? Good luck alex.
Russell Dias
+1  A: 

How new should the new language be? PHP, Python and Ruby are all dynamic languages, so they share many concepts. I second Guge's recommendation to learn C. And you can go further - for mind enhancement, learn a dialect of LISP, such as scheme, and read SICP. Learning Java can also be useful and a different experience than PHP.

Yuval F
+1  A: 

If you're looking for something that will be a fairly easy transition from PHP, I would recommend Perl. PHP borrows a lot from Perl in terms of syntax and structure, so you may find it a comfortable language to work in if you're familiar with PHP. Perl is also a widely used/supported language with extensive third party libraries for just about every purpose.

Python is a great language to ease into systems programming IMO. The syntax is intuitive, encourages clean code and good habits. It's pretty much neck and neck with Perl for features and third party library availability in my experience, so with either language you'd be off to a good start. You may find Perl to be more familiar, coming from PHP, but I can highly recommend Python as well if you find that's where your interest lies.

Jay
+3  A: 

Groovy is also worth a look. IMHO its evey bit as good as Ruby, Python etc and it has the advantage that it easily integrates with Java code.

Paqman
+4  A: 

From Peter Norvig's Teach Yourself Programming in Ten Years:

"Learn at least a half dozen programming languages. Include one language that supports class abstractions (like Java or C++), one that supports functional abstraction (like Lisp or ML), one that supports syntactic abstraction (like Lisp), one that supports declarative specifications (like Prolog or C++ templates), one that supports coroutines (like Icon or Scheme), and one that supports parallelism (like Sisal). "

Corbin March
That article is great.
alex
+1  A: 

I've gone from PHP to Ruby and I think I'm in love.

dylanfm
A: 

Python would be a good choice.

alok
+1  A: 

I'd say download Visual Studio Express C# - it's free and will give you the chance to see a completely different culture and code structure.

Iain
+2  A: 

Most of these responses seem to be advocating what I would consider alternatives to PHP. Without wishing to be rude to the other posters, what's the point of that? If you were planning to give up PHP, it would be fair enough. If you were wanting to move away from web dev, it would be fair enough. But, you have a job in web dev, and you presumably want to find something useful to scratch that 'something new' itch with. So, why not learn something that you can use in conjunction with PHP, something that'll be an addition, not an alternative?

Javascript would be the obvious choice, IMHO, for the benefit of being able to get your code off the server and into the browser when you need to.

JoeBloggs
Thanks for your response, but I already do code a lot in JavaScript, using jQuery more often than not. Perhaps I should return back to raw JS for a bit, to remember 'the old days' before jQuery and so I'm not so dependent on it.
alex
With the new Google Chrome OS, Javascript is getting a lot of points in the most wanted's list.
backslash17
+1  A: 

Python: it's very easy to learn (I started with Dive Into Python) and you'll [finally] be able to write your own GUI apps that don't need to run in a web browser.

too much php
+1  A: 

Since you've started at the top level of abstraction, maybe go back to the bottom and start learning how the machine works. Say, a course on digital fundamentals. There are many JC level courses that start at 74 series digital ICs and progress to building small microcontroller based systems.

+2  A: 

You might as well give Ruby a try, but I strongly suggest you also try out either C# (ASP.net) or Java (Struts or Spring) for web development...

Godcode
A: 

Since you are from PHP and wanting to learn something new, I assume you want a little bit of challenge. Try using Java and build webapplication with JavaEE stack. You will learn a valuable lesson and will appreciate PHP.

jpartogi