Easy to mix php functions

Source: Internet
Author: User
Obfuscated php functions addcslashes ($ str, 'M'); & nbsp; escape before specified characters & nbsp; stripcslashes ($ str) remove the escape of this function. addslashes (string) is easy to confuse with php functions.
Addcslashes ($ str, 'M'); escape stripcslashes ($ str) before a specified character to remove the escape of this function
Addslashes (string) pre-defined escape stripslashes remove the escape of this function


No isset = false empty = true is displayed in the variable.

Implode array-> str
Emplode str-> array

Array_key_exists ($ key, array) $ whether the key is in the array key
In_array ($ value, array) $ whether value is in the value of array


Ob_start () open the buffer
Ob_get_contents () returns the buffer content
Ob_end_clean () clears the buffer and closes the buffer.

Test code:
Ob_start (); echo "content after ob_start will not be output
"; $ Out = ob_get_contents (); ob_end_clean (); echo" content output after ob_end_clean
"; Echo $ out;


Output result:
Content after ob_end_clean is output. content after ob_start is not output.


Url encoded by urlencode is % hexadecimal
Url decoded by urldecode

Delimiters

Constant () supports variable constants
Defines a case-insensitive constant:
 


Const and define
Define cannot be defined in the class, and const must be defined in the class, and const must be accessed through the class name: variable name; "$" is not recommended before the constant name
class Person{    const COUNTRY="china";}echo Person::COUNTRY;

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.