PHP MCQ Quiz & Online Test
- PHP is a ............
- The date_sunset() function returns the sunset time for a specified day and location.
- Which of the following symbol is used to add multiple line comments in PHP ?
- PHP is a case sensitive
- Which sign is used to access variable of variable in PHP?
- Which of following is not a Superglobals in PHP?
- Which function is used to get ASCII value of a character in PHP ?
- ______ is used to unset a variable in PHP ?
- How many error levels are available in PHP ?
- In which version of PHP E_STRICT Error level is introduced ?
- Which function in PHP is used to get the length of string variable?
- Which of the below symbols is a newline character?
- Who is the father of PHP?
- Type Hinting was introduced in which version of PHP?
Last Updated: Sep 18, 2021,
Posted in Interview Questions,
35 Questions
Take PHP Quiz & Online Test To test your Knowledge
We have listed below the best PHP MCQ Questions, that check your basic knowledge of PHP. This PHP MCQ Test contains 35+ PHP Multiple Choice Questions. You have to select the right answer to check your final preparation for the PHP Exam/Interviews. apart from this, you can also download the PHP MCQ PDF, completely free.
1. PHP is a ............
- Open Source Laguage
- Widely Used Language
- Server side scripting language
- All of the above
View Answer
All of the above
PHP is an open Source, server-side scripting language. It is widely used for creating dynamic webpages.
6. Which of following is not a Superglobals in PHP?
- $_SERVER
- $_ENV
- $_FILES
- $_PUT
7. Which function is used to get ASCII value of a character in PHP ?
- asc()
- chr( )
- ascii()
- val( )
View Answer
chr( ) function is used to get ASCII value of a character in PHP.
8. ______ is used to unset a variable in PHP ?
- delete()
- unset()
- unlink()
- delete();
View Answer
unset() is used to unset a variable in PHP ?
9. How many error levels are available in PHP ?
- 20
- 4
- 19
- 16
View Answer
There are 16 error levels are available in PHP programming.
11. Which function in PHP is used to get the length of string variable?
- count()
- strcount
- strlen
- len
View Answer
strlen function in PHP is used to get the length of string variable.
Syntax:
$string="Apple"; echo strlen ($string); // outputs 5
13. Who is the father of PHP?
- Drek Kolkevi
- Rasmus Lerdorf
- Willam Makepiece
- List Barely
View Answer
Rasmus Lerdorf
Rasmus Lerdorf is the father of PHP. He is a Danish-Canadian and co-author of the PHP programming language.
15. A function in PHP which starts with __ (double underscore) is known as __________ .
- Inbuilt Function
- Default Function
- Magic Function
- User Defined Function
16. Which of the following PHP functions accepts any number of parameters?
- func_get_args()
- func_get_argv()
- get_argv()
- get_argc()
20. PHP stands for ..........
- Personal Home Page
- PHP Hypertext Preprocessor
- Pro Hypertext Preprocessor
- None of the above
View Answer
PHP Hypertext Preprocessor
PHP stands for PHP Hypertext Preprocessor. It appeared first in 1995.
21. PHP files have a default file extension of .............
- .xml
- .html
- .php
- .py
View Answer
.php
PHP files have a default extension of .php. It is a plain-text file that contains the source code written in the PHP language.
22. Which of the following is/are a PHP code editor?
- Notepad ++
- VS Code Editor
- Sublime Text
- All of the above
View Answer
All of the above
Notepad ++, VS Code Editor, and Sublime Text are the Top PHP code editor software. these are the source code editor program, that is mainly designed for editing the source code of computer programs.
23. How to define a function in PHP?
- function {function body}
- functionName(parameters) {function body}
- function functionName(parameters) {function body}
- None of the above
View Answer
function functionName(parameters) {function body}
24. what is the latest version of PHP?
- PHP 3
- PHP 5
- PHP 7
- PHP 8
View Answer
PHP 8
PHP 8 is the latest version of PHP. It is initially released on 7 January 2021.
26. Which PHP function is used to find files?
- file()
- fold()
- glob()
- None of the above
27. Is php is a programming language?
- Yes
- No
View Answer
Yes
Yes! PHP is a programming language and specially used for developing dynamic websites.
30. Which of the following function is used to compress a string?
- zip()
- compress()
- zip_compress()
- gzcompress()
View Answer
gzcompress()
gzcompress() function is used to compress a string.
- Hello World
- Hello World!
- Hello World! Welcome to the Online Interview Questions
- None of the above
View Answer
Hello World! Welcome to the Online Interview Questions
32. Which of the following is used to create a session?
- $_SESSION[]
- isset() function
- session_start() function
- session_destroy() function
View Answer
session_start() function
session_start() function is used to create a session in Php.
34. There are ............ error levels are available in PHP?
- 15
- 16
- 17
- 14
View Answer
16
There are 16 error levels are available in PHP. these levels are as follows - E_ERROR, E_WARNING, E_PARSE, E_NOTICE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING, E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE, E_STRICT, E_RECOVERABLE_ERROR, E_DEPRECATED, E_USER_DEPRECATED, E_ALL.
35. What does SPL stands for in Php?
- Source PHP List
- Standard PHP List
- Standard PHP Library
- None of the Above
View Answer
Standard PHP Library
SPL stands for Standard PHP Library. It is a collection of classes and interfaces, that are used to solve common problems.
Source: https://www.onlineinterviewquestions.com/php-mcq/
Posted by: hongflorine0194771.blogspot.com
Post a Comment