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
Which of the below symbols is a newline character?
1.
2.
3./n
4. /r
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)
Which version of PHP introduced Try/catch Exception?
1. PHP 4
2. PHP 5
3.PHP 5C. PHP 5.3
4. PHP 6
A PHP script should start with ___ and end with ___:
1. < php >
2.< ? php ?>
3. < ? ? >
4.< ?php ? >
PHP files have a default file extension of.
1.htmlB
2.xml
3..php
4. .ph
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)
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)
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
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
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)
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
Who is the father of PHP?
1.Rasmus Lerdorf
2.Willam Makepiece
3.Drek Kolkevi
4. List Barely