Having a function like nl2br [2], which converts newlines to br tags. The only reason this function would be useful is when you want text to HTML. The problem is, this requires a lot more than just replacing newlines with br tags.
A function like intval [3], which according to the documentation when passed a string "will most likely return 0".
And just about anything on http://www.phpwtf.org/
My main point is, that PHP is not broken because of these features. PHP is broken because the language has been hacked together from the start and there is no way to guess what built in functions will do if you haven't looked up the full documentation for them first.
[1]: http://www.decontextualize.com/wp-content/uploads/2010/01/ph...
[2]: http://php.net/manual/en/function.nl2br.php
It's only popular because it's easy to setup shared apache+php hosts and deploy scripts via FTP on it.
(to be honest I'd love to see PHP dead and buried, but there's still no other tool that fills its niche, and I hope that when one such tool gets developed, it's actually based on a sane programming language - PHP as a language means nothing, it was just "something" that grew organically into a language to fill an empty niche, and the only other alternative for this niche back then would've been Perl).
I read that as "let me mix them together like a PHP spaghetti app". The original poster may not have meant that, but after 13 years of writing PHP, the common complaint I still hear from newbies is "but structuring my code/using a framework has such a steep learning curve!". I'd rather like separation of concern enforced at the language level :)
And no, I don't have a clue how that'd work ;)
...now, I first learned coding by solving algorithmic math problems in C, but if someone would've tried to make me learn C++ or Java and OOP at that point I would've had the same complaint your newbies are having about "why learn so much just to 'structure' my code?!" :)
Unfortunately it also makes possible the abuse you note - hopefully there's better solutions than requiring a different language in those 3 places.