Although I think that PHP is certainly not the best language in the world and it's pretty easy to write unsafe code in it, I don't think that's true.
I agree that PHP tends to trick you into writing unsafe code, but I generally don't agree that their documentation is full of unsafe examples (not anymore at least).
Can you name an example that proofs your point?
lol, yes.
The best thing are the comments in the docs of people telling you how wrong the docs are.
No seriously, that is actually one of the best things. The comments on PHP docs are far more informative than the actual documentation for many other languages. Most everywhere else the caveats are simply left up to the developer to discover the hard way.
I mean, it's certainly extensive, but it's rife with the worst programming practices, and extremely bad/unsafe examples.