As for PHP, many people make fun of it. And in some cases it's understandable but in others not.
I've written a lot of PHP. It's not
terrible, but I definitely wouldn't recommend it for new programmers. PHP was originally designed as basically a Web framework on top of C, and it still feels like it. When I'm writing PHP, I feel like I'm writing C + thousands of extra functions and macros. The procedural style is satisfying to some extent, but it gets messy quickly, and the further you get from C (eg. classes), the more clunky it feels. Also, PHP has a bunch of weird default behavior which is supposed to make things easier for newbies, but it's just a big headache. For example, it always takes you a long time to figure out how to get error handling working sanely for your application.
PHP and JavaScript are both total messes as languages, though they have very different styles.
If I wanted to make a new Web app, I might use JavaScript just because it's so immensely popular for that work, even though it's flawed, or I might use a Web framework for a newer language like perhaps Python. I wouldn't make a new app in PHP.
Are you sure you can use PHP as a scripting langage?
You can, but there are some major inconveniences with it, so it's not all that common.