Home > Backend Development > PHP Problem > Are php variables case sensitive?

Are php variables case sensitive?

藏色散人
Release: 2023-02-27 09:22:02
Original
2825 people have browsed it

Are php variables case sensitive?

Are php variables case sensitive?

PHP variable rules:

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

Variable names must start with letters or underscores Beginning

Variable names cannot begin with a number

Variable names may only contain alphanumeric characters and underscores (A-z, 0-9, and _)

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

Note:

PHP variable names are case-sensitive!

Code example:

<?php
 
$a = &#39;a&#39;;
$A = &#39;A&#39;;
echo $a;
echo $A;
 
?>
Copy after login

Output:

aA
Copy after login

For more PHP related knowledge, please visit PHP Chinese website!

The above is the detailed content of Are php variables case sensitive?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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