Which of the following are valid PHP variable names?
- $my_var
- $123abc
- $_VAR
- All of the above
In PHP, variable names must start with a letter or an underscore (_), followed by any number of letters, numbers, or underscores. So, $my_var and $_VAR are valid variable names, but $123abc is not because it starts with a number. Learn more: https://www.php.net/manual/en/language.variables.basics.php
Loading...
Related Quiz
- In PHP, the * operator is used for ______.
- To access an element of an indexed array in PHP, you use the name of the array followed by the ______ of the element in square brackets.
- What is the software stack called that includes PHP, Apache, and MySQL for Windows?
- How do you handle errors when using libxml functions in PHP?
- The sort() function in PHP sorts an array in ______ order.