PHP Classes

File: README.md

Recommend this page to a friend!
  Classes of Ali YILMAZ   IS PHP HTMLSpecialChars   README.md   Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: IS PHP HTMLSpecialChars
Check if a HTML string contains special characters
Author: By
Last change:
Date: 2 years ago
Size: 1,072 bytes
 

Contents

Class file image Download

What is is_htmlspecialchars ?

This package serves to check whether the data shared with it contains HTML special characters. The data must be specified in string type. Returns true if the HTML contains special characters, otherwise false.

data:

$code = 'merhaba <?=$this->timestamp;?>';

Out-of-class use:

code:

require_once('Mind.php');
if($m::aliyilmaz('is_htmlspecialchars')->is_htmlspecialchars($code)){
    echo 'HTML contains special characters.';
} else {
    echo 'HTML does not contain special characters';
}

When using it in the class:

code:

if(self::aliyilmaz('is_htmlspecialchars')->is_htmlspecialchars($code)){
    echo 'HTML contains special characters.';
} else {
    echo 'HTML does not contain special characters';
}

output:

HTML contains special characters.

Dependencies

This package has no dependencies.

License

Instructions and files in this directory are shared under the GPL3 license.