Which function in php validate if the string is html? My target to take input from user and check if input html and not just string.
Example for not html string:
You can use DomDocument's method loadHTML