PHP has many built-in functions, most of which are widely used by programmers. But there are also some functions hidden in the corner. This article will introduce seven little-known functions that are very useful. Programmers who have never used it
Seven little-known but super-practical PHP functions and little-known php Functions
PHP has many built-in functions, most of which are widely used by programmers. But there are also some functions hidden in the corner. This article will introduce
DateTime a = DateTime.Parse ("2010-1-9 8:00:00");DateTime B = DateTime.Parse ("2010-1-13 13:41:52");return a > B;-----------------------------------------------------Date1=new Date ("2002/1/1")Date2=new Date ("2002/1/2")Alert (Date.parse (date1)
Provides various official and user-released code examples. For code reference, you are welcome to learn about the differences between the time (), date (), and mktime () functions of php.
Php: time (), date (), mktime () date and time function
Purpose: Verify the format of the IP addressInput: Strip:ip AddressReturns: False if True is returned by validation;*/function IsIP (StrIP) {if (IsNull (StrIP)) return false;var re=/^ (\d+) \. (\d+) \. (\d+) \. (\d+) $/g//matching regular
PHP has many built-in functions, most of which are widely used by programmers. But there are also some functions hidden in the corner. This article will introduce seven little-known functions that are very useful. Programmers who have never used it
Checkdate: Verify that the date is correct.Date: format the server time.Strftime: format the server time locally.Getdate: Get the time and date information.Gettimeofday: Get the current time.Gmdate: Get the current time difference from
Overview
PHP has a number of built-in functions, most of which are used by developers. But there are some equally useful but forgotten in the corner, this article will introduce 7 little-known features but very cool functions.
Highlight_string ()
Good JS verification ~~~~~~~~~~~~~~~~~~~~~~~~~
Purpose: Verify the format of IP address
Input: Strip:ip Address
Returns: False if return true through validation;
*/
function IsIP (StrIP) {
if (IsNull (StrIP)) return false;
var re=/^ (\d+) \. (\d+
Checkdate ($month, $date, $year)If the value that is applied constitutes a valid date, the function returns True. For example, for an error date of February 31, 2005, this function returns to False.
You can use this function to check the date and
PHP has many built-in functions, most of which are widely used by programmers. But there are also some functions hidden in the corner, this article will introduce you to 7 little-known, but very useful functions. A useless programmer might as well
A detailed explanation of the date and time function of PHP date ()Introduces the simple use of the PHP date-time function, which will introduce more functions to enrich our application.
checkdate ($month, $date, $year)
If the value that is
This article mainly introduces 7 little-known but very practical PHP functions, which are summarized in this article, such as highlight_string (), Str_word_count (), Levenshtein (), Get_defined_vars (), Escapeshellcmd () and other very useful but
PHP has many built-in functions, most of which are widely used by programmers. But there are some functions hidden in the corner, this article will introduce you to 7 little-known, but very useful functions. A programmer who doesn't use it may wish
Good JS verification ~~~~~~~~~~~~~~~~~~~~~~~~~Purpose: Verify the format of the IP addressInput: Strip:ip AddressReturns: False if True is returned by validation;*/function IsIP (StrIP) {if (IsNull (StrIP)) return false;var re=/^ (\d+) \. (\d+) \. (\
Function GetDayNum (no, type) {if (type = "35") {var num7 = document. getElementById ("6 "). value; var value = document. getElementById ("7 "). value; var valueR = num7; if (no = "7") {valueR = value;} // identify the time value if (num7! = "" &
& Lt; HTML & gt; & lt; HEAD & gt; & lt; TITLE & gt; Date Check function & lt; TITLE & gt; & lt; HEAD & gt; & lt; BODY & gt; & lt ;? & Nbsp; if (checkdate (1970, 1970) checks the date function & nbsp ;{& nbsp; & nbsp; print (, & nbsp ;:. this is a
PHP: time (), date (), mktime () date and time function libraries are often forgotten. here, you can add them to your favorites for convenience: checkdate: to verify the correctness of the date.
Date: format the server time.
Strftime: format the
Seven little-known but very practical PHP Functions
This article mainly introduces seven little-known but very practical PHP functions. This article summarizes such functions as highlight_string (), str_word_count (), levenshtein (),
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.