Home > Backend Development > PHP Problem > Can PHP variables not be capitalized?

Can PHP variables not be capitalized?

藏色散人
Release: 2023-03-14 11:20:01
Original
2515 people have browsed it

php variables can be capitalized. PHP variable rules include: 1. Variables start with a $ symbol, followed by the name of the variable; 2. Variable names must start with letters or underscore characters; 3. Variable names can only contain Alphanumeric and underscore; 4. Variable names cannot contain spaces; 5. Variable names are case-sensitive.

Can PHP variables not be capitalized?

#The operating environment of this article: Windows 7 system, PHP version 7.4, Dell G3 computer.

php Can’t capitalize variables?

php variables can be in uppercase letters.

Variables can have very short names (such as x and y) or more descriptive names (such as age, carname, totalvolume).

Variables are "containers" used to store information.

PHP variable rules:

  • Variables start with the $ symbol, followed by the name of the variable

  • Variable names must start with letters or underscore characters

  • Variable names can only contain letters, numbers and underscores (A-z, 0-9 and _)

  • Variable names cannot contain spaces

  • Variable names are case-sensitive ($y and $Y are two different variables)

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of Can PHP variables not be capitalized?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template