PHP MCQ Online Quiz Questions and Answer >>30 PHP MCQ On Online Quiz>>PHP MCQ Quiz & online Test Questions
PHP Quiz: PHP is mainly used for web development and it really excellent in this area. PHP stands for Hypertext PreProcessor. PHP is a server side scripting language that can be used to develop Static websites/Dynamic websites/Web applications. One of the major advantages of PHP is platform independent, meaning it can be used to Mac OS, Windows, Linux and supports most web browsers. PHP can be very tricky, so aspirants need to develop a excellent coding skills and solid technical background. PHP is still one of the most popular server-side scripting languages that are used many developer around the world. If you are beginners in this field, don’t have worry about that, try to practice the PHP MCQ Questions regularly. We have shared the 30 PHP MCQ questions for candidates who are preparing for interview. Candidates who wants to become a good developer kindly use this basic PHP online quiz questions. This is the great way to learn this PHP Quiz. Here are the link for CSS, JAVASCRIPT and HTML, you should learn the basics steps.
Press Here for CSS MCQ Questions |
Javascript MCQ Questions for exams |
HTML Quiz Questions and Answer |
PHP MCQ Questions and Answer >>Online Quiz Questions
1. Variables always start with a__________in PHP.
- Yen-sign
- Pond Sign
- Dollar Sign
- Euro Sign
2. You can test the type of any variable with the__________function.
- showtype()
- whattype()
- settype()
- gettype()
Answer: gettype()
3. Which of the following is not valid PHP code?
- &$something
- ${“MyVar”}
- $_10
- $10_somethings
Answer: $10_somethings
4. String values must be enclosed in __________
- single quotes
- double quotes
- Both A & B
- None
Answer: Both A & B
5. What is the limit of a PHP integer value?
- 1048576
- 65536
- 16384
- 2147483647
Answer: 2147483647
6. Under what circumstance is it impossible to assign a default value to a parameter while declaring a function?
- When the parameter is being declared as passed by reference
- When the function is being declared as a member of a class
- When the parameter is Boolean
- When the function contains only one parameter
Answer: When the parameter is being declared as passed by reference
7. PHP files have a default file extension of_______.
- .php
- .html
- .xml
- .ph
Answer: .php
8. How does the identity operator === compare two values?
- If the two values are strings, it performs a lexical comparison
- It returns True only if they are both of the same type and value
- It converts them to a common compatible data type and then compares the resulting values
- It converts both values to strings and compares them
Answer: It converts them to a common compatible data type and then compares the resulting values
9. Which of the below statements is equivalent to $add += $add ?
- $add = $add + 1c
- $add = $add +$ad
- $add = $add
- $add = $add + $add + 1
Answer: $add = $add +$add
11. Which of the below symbols is a newline character?
- \n
- \r
- /n
- /r
Answer: \n
12. Which version of PHP introduced Try/catch Exception?
- PHP 5.3
- PHP 5
- PHP 4
- PHP 6
Answer: PHP 5
13. Who is the father of PHP?
- Drek Kolkevi
- Willam Makepiece
- Rasmus Lerdorf
- List Barely
Answer: Rasmus Lerdorf
14. Which statement will output $x on the screen?
- echo “$$x”;
- echo “\$x”;
- echo “$x;”;
- echo “/$x”;
Answer: echo “\$x”;
15. Within a namespace, for accessing the built-in PHP classes you can prefix the class name with a ________and let PHP look in the global class list.
- Percent
- Asterix
- ampersand
- backslash
16. PHP considers the following values as False
- the one-character string 0
- the integer 0
- constant NULL
- All of Above
Answer: All of Above
17. Some PHP code might not have a namespace and therefore lives in the__________ namespace.
- PRE
- Global
- Default
- Automatic
Answer: Global
18. PHP’s numerically indexed array begin with position ______.
- 0
- 2
- 1
- -1
19. Which function returns an array consisting of associative key/value pairs?
- array_count_values()
- array_count()
- count()
- count_values()
Answer: array_count_values()
20. Which function can be used to move the pointer to the previous array position?
- prev()
- before()
- last()
- previous()
Answer: prev()
21. Which in-built function will add a value to the end of an array?
- array_push()
- inend_array()
- into_array()
- array_unshift()
Answer: array_push()
22. Which function will return true if a variable is an array or false if it is not?
- is_array()
- this_array()
- in_array()
- do_array()
Answer: is_array()
23. As the namespace size grows, using namespaces can become a little repetitious, but PHP also provides the _________ statement, which allows you to alias a specific namespace.
- grant
- php
- use
- lable
24. A function in PHP which starts with ______ (double underscore) is know as.
- Inbuilt Function
- Magic Function
- Default Function
- User Defined Function
Answer: Magic Function
25. Type Hinting was introduced in which version of PHP?
- PHP 5.3
- PHP 5
- PHP 4
- PHP 6
Answer: PHP 5
26. Which of the below namespace declaration is correct?
- namespace 1_RA;
- namespace ORA:
- namespace ORA;
- namespace ORA_#;
Answer: namespace ORA;
27. What array will you get if you convert an object to an array?
- An array with keys of that object as the array’s elements
- An array with properties of that object as the array’s elements
- An array with properties of that array as the object’s elements
- An array with properties of that object as the Key elements
Answer: An array with properties of that object as the array’s elements
28. What function computes the difference of arrays?
- diff_arrays
- arrays_diff
- diff_array
- array_diff
Answer: array_diff
29. 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()
- krsort()
- sort()
- asort()
Answer: asort()
30. Which array function checks if the specified key exists in the array?
- array_key_exists()
- array_key_exist()
- array_keys_exists()
- arrays_key_exists()
Answer: array_key_exists()
Candidate to know the latest updates and upcoming exam notification kindly lock in touch with our dailyrecruitment website regularly. Candidate those are interested in this field advised to practice the above PHP multiple choice questions/PHP MCQ Questions and Answer.
Govt Jobs by Qualifications
Education & Vacancies | Salary | Apply Link |
---|---|---|
12th Pass Govt Jobs - 18,000+ Vacancies | Rs. 5,200 - 92,300 | Apply Now |
ITI Pass Jobs - 3,500 Vacancies | Rs. 5,200 - 35,000 | Apply Now |
Any Graduate Jobs - 19,100 Vacancies | Rs. 5,200 - 92,300 | Apply Now |
Central Govt Jobs | Rs. 5,200 - 17,000 | Apply Now |
Bank Jobs - 1,000 Vacancies | Rs. 5,200 - 29,200 | Apply Now |
Diploma Jobs - 9,300 Vacancies | Rs. 5,200 - 35,000 | Apply Now |
BTech/BE Jobs - 18,000 Vacancies | Rs. 15,000 - 1,00,000 | Apply Now |
Data Entry Jobs - 1,300 Vacancies | Rs. 5,200 - 29,200 | Apply Now |
Private Jobs | Rs. 10,000 - 67,700 | Apply Now |