ExamVeda
Login
Home
1
What does PHP stand for?
1. Personal Home Page
2. Hypertext Preprocessor
3. Pretext Hypertext Processor
4. Preprocessor Home Page
Discuss
Answer & Solution
Answer: Option D
Solution:
PHP previously stood for Personal Home Page now stands for Hypertext Preprocessor.
2
PHP files have a default file extension of_______.
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
3
Which of the following is/are a PHP code editor?
1. Notepad
2. Notepad++
3. Adobe Dreamweaver
4. PDT
Discuss
Answer & Solution
Answer: Option B
Solution:
Any of the above editors can be used to type php code and run it.
4
Which of the following must be installed on your computer so as to run PHP script?
1. Adobe Dreamweaver
2. PHP
3. Apache
4. IIS
Discuss
Answer & Solution
Answer: Option D
Solution:
To run PHP code you need to have PHP and a web server, both IIS and Apache are web servers.You can choose either one according to your platform.
5
Which version of PHP introduced Try/catch Exception?
Discuss
Answer & Solution
Answer: Option B
Solution:
Version 5 added support for Exception Handling.
6
We can use _________ to comment a single line?
1. /?
2. //
3. #
4. /* */
Discuss
Answer & Solution
Answer: Option C
Solution:
/* */ can also be use to comment just a single line although it is used for paragraphs. // and # are used only for single line comment.
7
Which of the following php statement/statements will store 111 in variable num?
1. int $num = 111;
2. int mum = 111;
3. $num = 111;
4. 111 = $num;
Discuss
Answer & Solution
Answer: Option C
Solution:
You need not specify the datatype in php.
8
What will be the output of the following php code?
<?php
$num  = 1;
$num1 = 2;
print $num . "+". $num1;
?>
Discuss
Answer & Solution
Answer: Option B
Solution:
.(dot) is used to combine two parts of the statement. Example ( $num . “Hello World” ) will output 1Hello World.
9
What will be the output of the following php code?
<?php
$num  = "1";
$num1 = "2";
print $num+$num1;
?>
Discuss
Answer & Solution
Answer: Option A
Solution:
The numbers inside the double quotes are considered as integers and not string, therefore the value 3 is printed and not 1+2.
10
Which of following variables can be assigned a value to it?
1. $3hello
2. $_hello
3. $this
4. $This
Discuss
Answer & Solution
Answer: Option D
Solution:
A variable can’t start with a number. Also $this is a special variable that can’t be assigned, but $This can be assigned.