Home
Backend Development
PHP Tutorial
XML escape characters Migrating from C/C++ to PHP - function to determine character type



XML escape characters Migrating from C/C++ to PHP - function to determine character type
Jul 29, 2016 am 08:34 AMIn C/C++, the header file ctype.h defines a set of macros about character types, which can get the type of a given character.
There are no related functions in PHP. A few days ago, I found that the PHP downloaded from www.mm4.de provides an extension library named php_ctype.dll.
After loading, I found that some such functions are provided, and I have compiled them for your reference.
After loading the php_ctype.dll file correctly in PHP, use <?php phpinfo();?> to see the following information:
. The usage of all functions is basically the same as in C/C++. The difference is that in C/C++, the function parameters are chars, while in PHP, the function parameters can be strings. For example:
<?php
$string="123ADAADAD";
if(isalnum($string))
{
echo "Only uppercase and lowercase letters and numbers!";
}
?>
Attachment: php_ctype.dll Supported functions
bool isalnum(string)
bool isalpha(string)
bool iscntrl(string)
bool isdigit(string)
bool isgraph(string)
bool islower(string)
bool isprint(string)
bool ispunct(string )
bool isspace(string)
bool isupper(string)
bool isxdigit(string)
[The copyright of this article is jointly owned by the author Fancao0515 and Aosuo.com. If you need to reprint, please indicate the author and source]
The above introduces the XML escape character migration from C/C++ to PHP - the function to determine the character type, including the content of XML escape characters. I hope it will be helpful to friends who are interested in PHP tutorials.
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article
Repo: How To Revive Teammates
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
How Long Does It Take To Beat Split Fiction?
3 weeks ago
By DDD
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌

Hot tools Tags

Hot Article
Repo: How To Revive Teammates
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
How Long Does It Take To Beat Split Fiction?
3 weeks ago
By DDD
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

11 Best PHP URL Shortener Scripts (Free and Premium)

Working with Flash Session Data in Laravel

Simplified HTTP Response Mocking in Laravel Tests

cURL in PHP: How to Use the PHP cURL Extension in REST APIs

Build a React App With a Laravel Back End: Part 2, React

12 Best PHP Chat Scripts on CodeCanyon
