Q.

What will be the output of the following PHP code?

<?php
Echo "Hello World1";
echo " Hello world2";
ECHO " Hello world3";
?>
A.  

Hello world1 Hello world2 Hello World3

B.  
Hello world1 
Hello world2 
Hello World3
C.  

Error

D.  

Hello world1 Hello world3

Similar Questions
1.

What does PHP stand for?

   i) Personal Home Page
   ii) Hypertext Preprocessor
   iii) Pretext Hypertext Processor
   iv) Preprocessor Home Page
A.  

Both i) and iii)

B.  

Both ii) and iv)

C.  

Only ii)

D.  

Both i) and ii)

2.

PHP files have a default file extension of_______

A.  

.html

B.  

.xml

C.  

.php

D.  

.ph

3.

What should be the correct syntax to write a PHP code?

A.  

< php >

B.  

< ? php ?>

C.  

<? ?>

D.  

<?php ?>

4.

Which of the following is/are a PHP code editor?

    i) Notepad
    ii) Notepad++
    iii) Adobe Dreamweaver
    iv) PDT
A.  

Only iv)

B.  

i), ii), iii) and iv)
 

C.  

i), ii) and iii)
 

D.  

Only iii)

5.

Which of the following must be installed on your computer so as to run PHP script?

i) Adobe Dreamweaver 
ii) XAMPP
iii) Apache and PHP
iv) IIS
A.  

i), ii), iii) and iv)
 

B.  

Only ii)

C.  

ii) and iii)

D.  

ii), iii) and iv)

6.

Which version of PHP introduced Try/catch Exception?

A.  

PHP 4

B.  

PHP 5

C.  

PHP 6

D.  

PHP 5 and later

7.

How should we add a single line comment in our PHP code?

    i) /?
    ii) //
    iii) #
    iv) /* */
A.  

Only ii)

B.  

i), iii) and iv)

C.  

ii), iii) and iv)

D.  

Both ii) and iv)

8.

Which of the following PHP statement/statements will store 111 in variable num?

   i) int $num = 111;
    ii) int mum = 111;
    iii) $num = 111;
    iv) 111 = $num;
A.  

Both i) and ii)

B.  

i), ii), iii) and iv)

C.  

Only iii)

D.  

Only i)

9.

What will be the output of the following PHP code?

 <?php
    $num  = 1;
    $num1 = 2;
    print $num . "+". $num1;
    ?>
A.  

3

B.  

1+2

C.  

1.+.2

D.  

Error

10.

What will be the output of the following PHP code?

  <?php
    $num  = "1";
    $num1 = "2";
    print $num+$num1;
    ?>
A.  

3

B.  

1+2

C.  

Error

D.  

12

PHP TOPICS