bidezones.com /PHP/PHP Basics Mcq Questions Sample Test,Sample questions

Question:
 What will be the output of the following code?
< ?php 
$foo = 'Bob';              
$bar = &$foo;              
$bar = "My name is $bar";  
echo $bar;
echo $foo;
?>

1.Error

2.My name is BobBob

3.My name is BobMy name is Bob

4.My name is Bob Bob

Posted Date:-2022-03-04 18:03:44


Question:
 Which of the below symbols is a newline character?

1.

2.

3./n

4. /r

Posted Date:-2022-03-04 17:57:13


Question:
 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;

1.Both (i) and (ii)

2.All of the mentioned

3. Only (iii)

4.Only (i)

Posted Date:-2022-03-04 17:58:44


Question:
 Which version of PHP introduced Try/catch Exception?

1. PHP 4

2. PHP 5

3.PHP 5C. PHP 5.3

4. PHP 6

Posted Date:-2022-03-04 17:47:59


Question:
A PHP script should start with ___ and end with ___:

1. < php >

2.< ? php ?>

3. < ? ? >

4.< ?php ? >

Posted Date:-2022-03-04 17:42:01


Question:
PHP files have a default file extension of.

1.htmlB

2.xml

3..php

4. .ph

Posted Date:-2022-03-04 17:40:23


Question:
We can use ___ to comment a single line?
i) /?
ii) //
iii) #
iv) /* */

1.Only (ii)B.C. D.

2. (i), (iii) and (iv)

3.(ii), (iii) and (iv)

4.Both (ii) and (iv)

Posted Date:-2022-03-04 17:53:31


Question:
What does PHP stand for?
i) Personal Home Page
ii) Hypertext Preprocessor
iii) Pretext Hypertext Processor
iv) Preprocessor Home Page

1.Both (i) and (ii)

2.Both (ii) and (iv)

3.Only (ii)

4.Both (i) and (iii)

Posted Date:-2022-03-04 17:37:46


Question:
What will be the output of the following php code
< ?php 
$num  = 1;
$num1 = 2;
print $num . "+". $num1 ;
?>

1.3

2.1+2

3. 1.+.2

4.Error

Posted Date:-2022-03-04 17:59:49


Question:
What will be the output of the following php code?
< ?php 
$num  = "1";
$num1 = "2";
print $num+$num1 ;

1.3

2. 1+2

3.Error

4.12

Posted Date:-2022-03-04 18:01:09


Question:
Which of following variables can be assigned a value to it?
(i) $3hello
(ii) $_hello
(iii) $this
(iv) $This

1.All of the mentioned

2.Only (ii)

3.(ii), (iii) and (iv)

4.(ii) and (iv)

Posted Date:-2022-03-04 18:02:14


Question:
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

Posted Date:-2022-03-04 17:46:44


Question:
Who is the father of PHP?

1.Rasmus Lerdorf

2.Willam Makepiece

3.Drek Kolkevi

4. List Barely

Posted Date:-2022-03-04 17:39:01


More MCQS[bidezones.com ]

  1. PHP Mcq Set 1
  2. PHP Mcq Set 2
  3. PHP Mcq Set 3
  4. PHP Mcq Set 4
  5. Current affairs mcq php
  6. Current affairs mcq php set 2
  7. Current affairs mcq php set 3
  8. PHP MCQ
  9. PHP MCQ Basics
  10. PHP Mcq Functions
  11. PHP Mcq Arrays
  12. PHP Mcq Basics of Object-Oriented PHP
  13. PHP Mcq Error Handling
  14. PHP Basics Mcq Questions