MCQs On Basics - PHP | letsbug
MCQs On Basics - PHP
1. PHP stands for .........
- hypertext processor
- pretext hyper processor
- preprocessor home page
- none of the above
Answer: 1 : hypertext processor
2. What is the syntax of PHP code?
- <PHP>
- <? php ?>
- <? ??
- // PHP //
Answer: 2 : <? php ?>
3. What is the concatenation operator in PHP.
- =
- +
- ,
- .
Answer: 4 : .
4. What is correct way of declaring PHP variables ........
- $name
- $7name
- $this
- name
Answer: 1 : $name
5. PHP indexed array begin with position ..........
- 1
- 0
- -1
- +1
Answer: 3 : 0
6. What is the correct way for creating array in PHP?
- weekday[0] = "monday";
- $weekday[] = array("monday", "tuesday", "wednesday");
- $weekday[0] = "monday";
- $weekday = array("monday");
Answer: 3 : $weekday[0] = "monday"
7. PHP is _______ scripting language.
- client side
- server side
- browser side
- none of the above
Answer: 2 : server side
8. Which function is used to sort array in ascending order?
- sort()
- rsort()
- dsort()
- none of the above
Answer: 1 : sort()
9. There are three different kind of arrays:
- Numeric array, String array, Multidimensional array
- Numeric array, Associative array, Dimensional array
- Numeric array, Associative array, Multidimensional array
- Const array, Associative array, Multidimensional array
Answer: 3 : Numeric Array, Associative Array, Multidimensional Array
10. Assume you would like to sort an array in ascending order by value while preserving key associations. Which of the following PHP sorting functions would you use?
- ksort()
- asort()
- krsort()
- sort()
Comments
Post a Comment