But they're frameworks, they're not inherent of Python and Ruby. You have to seek those out to use them. Scratch that, you have to know you're looking for a framework in the first place before you even go looking for one. I'm pretty certain anyone starting out in Python or Ruby could write the same sort of really bad code as is possible in PHP just by following a few web tutorials and then expanding upon them.
If you want PHP frameworks to read about, have a look at
Symfony 2 and
Doctrine (an ORM for PHP),
Laravel and
Phalcon too and to a lesser extent (because it insists on still supporting PHP4)
Codeigniter. PHP isn't the raw, brash scripting language it used to be, it has made huge leaps in encouraging interoperability in the last 3~4 years* especially through the PHP FIG and the PSR standards which are designed to make sure your code is interoperable with that of others.
* Trying to type the tilde, I've just found out my Girlfriend has changed my Keyboard layout to US English.EDITED: 10 Oct 2014 21:44 by MATT