>Passing DOMDocumentFragment to DOMDocument::saveHTML() Produces invalid Markup<p>Of the few things PHP should be great at, parsing and generating html markup is close to the top of the list. Yet DOMDocument has given me so many headaches...
PHP has a reputation as a language that makes dead easy to write very ugly sphagetti code. As far as I learned a lot has chaned since last time I was using PHP - something like 5 years ago.<p>Is there any good book or other resource which describes <i>modern</i> PHP with best practices, parts to avoid, etc?
Since anything PHP-related on HN is bound to spur the usual PHP hate, here's something that might confuse the haters: PHP is actually faster than Go in many cases (according to <a href="http://www.techempower.com/benchmarks/#section=data-r8&hw=i7&test=query&f=5mdc-0-0" rel="nofollow">http://www.techempower.com/benchmarks/#section=data-r8&hw=i7...</a>).
Friendly reminder that we can't have anything involving PHP without:<p>* complaints about features it has or has not<p>* a reference to that "a fractal of bad design" article<p>* how language x is better<p>* sarcastic, ironic or post-ironic notes about the above<p>* one guy pointing out we can't have anything involving PHP without the above