categorization
arrange in order
5 Ways PHP Determines Whether or Not It's Null
1. isset function: to determine whether the variable is initialized Description: it does not determine whether the variable is empty, it can be used to determine whether the elements of the array have been defined. Note: When using isset to determine whether an array element has been initialized, it is more efficient than array_key_exists ...
PHP objects, arrays, strings, escaping, etc.
1、Convert array to object /** * Convert array to object * @param array $data array * @return Return object (object) */ function array2object($array) { if (is_array($array)) { $obj = new StdClass(); ...
WordPress using Redis cache (Redis Object Cache plugin) to optimize access performance
Redis Object Cache A persistent object caching backend powered by Redis. Supports Predis, PhpRedis (PECL), Relay, replication, sentinels, clustering, and WP-CLI. Rewritten for raw performance 100% WordPress API compatible...
PHP Remove all html code from string (formatting code html)
PHP Remove all html code from string (formatting code html)
PHP checks if the number is a plain number
The first: directly use a function, is_numeric() This function is to detect whether the parameter is a number, if so, return true, if not, return false, for example: is\_numeric( 'abcd123' ) ordie('the provided parameter is not a number'); The second ...
PHP string encryption and decryption functions
1, simple string encryption, decryption function /** * String encryption, decryption function * * * @param string $txt String * @param string $operation ENCODE for encryption, DECODE for decryption, optional parameter, default is ENCODE, * @param st...
Good server panel
Website One-stop creation, management of multiple websites, a variety of open source website system automatically installed and deployed Security Integrated security policy, server security hardening program Eco Built-in application store, open source software, tools and plug-ins, one-click installation and configuration Simple and clear ...











