What are the main characteristics of a PHP variable?

Following are some of the most important aspects of the usage of variables in PHP:

  • Variables can be declared before the value assignment.
  • A variable value assignment happens using the ‘=’ operator.
  • Every variable in PHP is denoted with a $ (dollar) sign.
  • The value of a variable depends on its latest assigned value.
  • PHP variables are not intrinsic. There is no explicit declaration.

Next up on these PHP interview questions for freshers, you need to understand what NULL is.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *