So what is it's alternative, without using commercial stuff like .net and java? I may just stick to php anyway but I still want to see what alternatives exist. The nice thing with php is it's availability.
You mean availability as in the ability to find hosts that support it?
I don't think you'll have a problem with RoR or python.
Ruby on rails is getting increasingly popular.
Python as well with web frameworks like django, pyramid/pylons and others.
All these frameworks have at least one advantage over PHP and that is that they are built on top of well structured, mature and widely used programming languages that have been around for some 20 years and are still in active development.
I know PHP has been around for as long, but calling php mature is like calling a jobless 40 year old, living with his parents, mature.
At least try something else before shooting it down. Worst thing that could happen is that it improves your programming skills.
PHP has it's place and thats why it became so popular. It is perfectly suitable for small (= simple (CRUD like) and "low usage") Applications where using .net or Java would just not make much sense. Not all applications even in big companies must be "enterprisey".
There are lot more things than .net or java that can be used for web dev with great efficiency.
Though, if you're just hacking together some functionality for a relatively low traffic, semi static website, something that wouldn't need to be maintained much... then php could work out allright.
But just because something isn't "enterprisey", that doesn't mean you don't want it to perform and scale well and be easy to maintain... or not frustrating as hell to write
What was that function called 'array_search', or was it 'arraysearch'.. do I put the needle first or the haystack. You don't have this shit in sanely designed languages.
PHP is so slow Facebook had to create a PHP to C++ compiler so that they wouldn't have to buy twice as many servers.
Why they didn't just switch to another language is beyond me. maybe that had too much legacy code in PHP and didn't want to retrain all their php guys in something else, which could take a year.
It takes a shitload of resources to rewrite something on the scale of facebook in a new language, regardless of how bad the original language is it's sometimes easier/cheaper to just tweak it best you can and throw more hardware at the problem.
Though I'm sure if Zuckerberg was doing it all over again today, he probably wouldn't go with PHP.