Get the App
SLTechnology News&Howtos  ›  Development  › 

How to express the incorrect PHP variable name?

Shulou Source: shulou.com Published: 2022-06-02 12:32:49 09月15日 Update

This article mainly introduces the incorrect name of the PHP variable how to express, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.

The incorrect PHP variable name is "$9thizBeijing" because the PHP variable name must start with a letter or an underscore character, and the PHP variable name is case-sensitive.

This article operating environment: Windows7 system, PHP7.1, Dell G3 computer.

The incorrect PHP variable name is $9thizBeijing.

This requires familiarity with the rules of PHP variables.

The rules for PHP variables are as follows:

The variable begins with the $symbol, followed by the name of the variable

Variable names must start with a letter or an underscore character

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

Variable names cannot contain spaces

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

Both PHP statements and PHP variables are case-sensitive.

Thank you for reading this article carefully. I hope the article "how to express the incorrect PHP variable name" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and follow the industry information channel. More related knowledge is waiting for you to learn!

Tags: Variables articles underscores size letters characters rules different two values interests simultaneously names numbers more friends environment computer knowledge spaces Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn MariaDB Shulou Tech Info Xiaomi Apple