Quick Table of Contents
[تحسين] Naming Variables
A variable consists of two parts: the variable ’ s name and the variable ’ s value. Because you ’ ll be using
variables in your code frequently, it ’ s best to give your variables names you can understand and
remember. Like other programming languages, PHP has certain rules you must follow when naming
your variables:
Variable names are case - sensitive( $Variable and $variable are two distinct variables), so it ’ s worth sticking to one variable naming method — for example, always using lowercase — to avoid mistakes. It ’ s also worth pointing out that variable names longer than 30 characters are somewhat impractical. Here are some examples of PHP variable names:$my_first_variable $anotherVariable $x $_123
15 / سبتمبر / 2011 الساعة 19:56
|