PHP Variables, Echo/Print and Syntax Questions and Answers
1. Which symbol is used to declare variable in php?
Loading...
2. How to declare a string variable in php?
Loading...
3. Which are invalid variable ?
Loading...
4. $name = ’foo’;
$$name = ’bar’;
Result of echo $foo;
Loading...
5. $name = ’123’;
$$name = ’456’;
Result of echo ${’123’};
$$name = ’456’;
Result of echo ${’123’};
Loading...
6. How to define constant in php ?
Loading...
7. Select invalid constant.
Loading...
8. $a = 10;
$b = $a;
$b = 20;
Result of echo $a;
$b = $a;
$b = 20;
Result of echo $a;
Loading...
9. $a = 10;
$b = &$a; // by reference
$b = 20;
Result of echo $a;
$b = &$a; // by reference
$b = 20;
Result of echo $a;
Loading...
10. Which are the global array in php ?
Loading...
Are these questions helpful for you?
Comments: (Your feedback is valuable to us)