Which is best for performance usage/usability, "file_get_content" or "DOM LoadHtmlFile" ?
As they both get the html content, what is the optimal situation to use one or the other?
This Also go with the "file_put_content" and "DOM SaveHtmlFile"
I was a newbie back when I posted this question. Here is my conclusion at the time I am writing this,
they both do different things completely. "DOM LoadHtmlFile" is a part of a
DOMDocument
class which is very powerful to manipulate html formatted content, andfile_get_content
is used to get file/http content as a string and manipulate as your wish. On a case scenario if the target content are in html format, depending on needs, if requires heavily change then I would personally useDomDocument
class. If otherwise, I would just manipulate as a string.