PHP Quiz | Set-1
Question 1 |
Hypertext Preprocessor | |
Pretext Hypertext Preprocessor | |
Processor Hypertext Processor | |
None of the above |
Discuss it
Question 2 |
The default file extension in PHP are ____
.php | |
.css | |
.js | |
.html |
Discuss it
php is default extension of PHP.
Question 3 |
const | |
define | |
var | |
let |
Discuss it
Question 4 |
Sign ! | |
Sign $ | |
Sign & | |
Sign # |
Discuss it
Question 5 |
Which of the following is the syntax of comment in PHP?
/* */ | |
# | |
// | |
All of the above |
Discuss it
There are 3 ways to write comments in PHP. /* */ is a multiline comment you can comment as: /* This is a multiple line comment /*, # This is a single-line comment in PHP and this is also // a single line comment you can write as // This is a single-line comment.
Question 6 |
If you want to add write the PHP code which of the below code editor is used?
Notepad++ | |
Sublime | |
Visual code | |
All of the above |
Discuss it
Notepad ++, Sublime Text, and Visual code. These three are most used for writing the PHP script. These all are code editors
Question 7 |
Which of the below method is used to generate the unique id in Php?
unique() | |
id() | |
mid() | |
None of the above |
Discuss it
The unique id is a function in PHP that is responsible for the generation of a unique id at some millisecond time. It doesn't guarantee the return value .unique id takes 2 parameter prefixes and more_entropy. And it supports in PHP 4+ version.
Question 8 |
. | |
+ | |
Append | |
All of the above |
Discuss it
Question 9 |
Which of the below is the correct syntax for opening the given file in PHP?
"geeky.txt"
fopen("geeky.txt", "r"); | |
fopen("geeky.txt", "w"); | |
fopen("geeky.txt", "read"); | |
fopen("geeky.txt"); |
Discuss it
The correct syntax for opening the file in PHP is open("geeky.txt", "r"); where r represents the reading mode of the file and "geeky.txt" is the name of the file.
Question 10 |
php_display() | |
phpinfo() | |
info_config() | |
None of the above |
Discuss it



.png)