In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains "what are the little-known functions in PHP". The explanation in the article is simple and clear and easy to learn and understand. Please follow the editor's train of thought to study and learn "what are the little-known functions in PHP".
Levenshtein ()
Have you ever experienced a time when you need to know how different the two words are? this function is here to help you solve this problem. It can compare the different degrees of two strings.
Usage:
The copy code is as follows:
Get_defined_vars ()
This is a very useful function when debugging debug. This function returns a multidimensional array containing all the defined variables.
Usage:
The copy code is as follows:
Php_check_syntax ()
This function is very useful and can be used to check whether the syntax of PHP is correct. For technical reasons, this function has been removed since PHP 5.05.
Usage:
The copy code is as follows:
Ignore_user_abort ()
This function is used to reject the request of the browser-side user to terminate the execution of the script. Normally, the exit of the client causes the server-side script to stop running.
Usage:
The copy code is as follows:
Highlight_string ()
The highlight_string () function is very useful when you want to display PHP code on a page. This function will highlight the PHP code you provided with the built-in PHP syntax to highlight the defined color. This function takes two arguments, the first of which is a string, indicating that the string needs to be highlighted. If the second parameter is set to TRUE, the function will return the highlighted code as a return value.
Usage:
The copy code is as follows:
Highlight_file
This is a very useful PHP function that returns the specified PHP file and highlights the contents of the file in a highlighted color according to its semantics. The highlighted code is processed with HTML tags.
Usage:
The copy code is as follows:
Php_strip_whitespace
This function is also similar to the previous show_source () function, but it removes comments and spaces from the file.
Usage:
The copy code is as follows:
Get_browser
This function reads the browscap.ini file and returns browser compatibility information.
Usage:
The copy code is as follows:
Memory_get_usage (), memory_get_peak_usage (), getrusage ()
These functions are used to get memory and CPU usage, the memory_get_usage () function returns memory usage, the memory_get_peak_usage () function returns the peak memory usage, and getrusage () returns CUP usage. These functions will provide you with some useful information when debugging PHP code performance. Note, however, that it is not valid on Window in these functions.
Usage:
The copy code is as follows:
Gzcompress (), gzuncompress ()
These two functions are used to compress and decompress string data. Their compression ratio can reach about 50%. The other functions gzencode () and gzdecode () achieve similar results, but use different compression algorithms.
Usage:
The copy code is as follows:
Thank you for your reading, these are the contents of "what are the little-known functions in PHP". After the study of this article, I believe you have a deeper understanding of what little-known functions in PHP have, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.