A summary of the issue of whether PHP is case sensitive

Source: Internet
Author: User
PHP is sensitive to variables, constants, and casing. Not sensitive to class name, method name capitalization. Not sensitive to null,false,true and so on, but also sensitive to the configuration parameters in php.ini. This article summarizes the problems in this area.

This article is a summary of the sensitivity of the case to PHP. However, it is recommended to always adhere to "case sensitive" and follow the Uniform Code specification. First, case sensitive 1, variable names are case-sensitive

 
      

2, the constant name is case-sensitive, usually written in uppercase (but not found can change the default configuration item, solve)

 
      

3,php.ini configuration item Directives are case-sensitive as File_uploads = 1 cannot be written as File_uploads = 1

Two, case insensitive 1, Function name, method name, class name is not case-sensitive, but recommended to use the same name as defined 2, magic constants are not case-sensitive, the recommended capitalization includes: __line__, __file__, __dir__, __function__, __class__, __method__, __namespace__.

 
      

3,null, TRUE, and false are case-insensitive, and the following PHP function Var_dump are used.

 
      
  • Related Article

    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.