Looking to get some advice. I used to develop in assembly, basic, cobol, and other dinosaur languages. I've recently taken up doing personal work in HTML and PHP. Looking for a suggestion on a language to mix with those in a special home web environment.
Wow, lots of interesting perspectives. Just thought I'd mention that I chose PHP 5/6, and now v7 because it is a piece of cake, very very similarly structured to old school OO basic so it was easy to pick up, and is interpretive like basic unless there is a PHP compiler??!? It is also standard on LAMP, with millions of sample apps available on the weeb. I've also learned that "Java is to javascript as car is to carpet", and will need to read up as to why...I always though they were related, but not exactly the same.
While I don't particularly like working with PHP I must say that if it's good enough for facebook, it's good enough for anything. If you're comfortable with it, I'd say you should just continue working with it.
If you're just starting, however, I'd recommend Python: it's easy to learn, powerful enough and there are thousands of tools and libraries for it.
It doesn't hurt to know at least a bit of javascript either, being the only language for front-end and all that.
As for the other two options in the question:
Honestly if you are starting out on your own and you don't have to fit in with a team of existing PHP developers then go with Python or Ruby (or perhaps Groovy if you like the JVM) instead.
PHP is not a language that I would recommend to anyone who already knows how to program. With Ruby you've got Rails for big heavy projects, Padrino and Sinatra for lighter weight stuff, and with Python you have Django and Pyramid when you need "batteries included" web frameworks and Flask and Bottle when you need something lightweight. Groovy has Grails (like Rails but for Groovy) and Ratpack for the more lightweight approach.
Don't misunderstand I've had PHP jobs on and off for the last 16 years and it has been good to me, but once I started working in languages like Python and Ruby as well I started to realise the downsides of PHP.
Also, if you are going to do freelance webdev you are going to need to focus some of your attention on JavaScript; some things need to be scripted in the UI. That and you will need to look at CSS, specifically CSS 3, and HTML, specifically HTML5 these days, but XHTML 4 as well.
Good luck - if you steer clear of PHP you will have a much happier time...
Oliver Godby
Professional Nerfherder and Code Wrangler
Anthony Rossbach
I develop large scale projects for companies and myself. I also own and run NodeHost, a web hosting company.
Javascript. If you are dealing with the web learn it and CSS. With Javascript any interface you want to built you can.