Sunteți pe pagina 1din 2

Question Opt-1 Opt-2 Opt-3 Opt-4 Opt-5 Complexity CO-Level Blooms-Level

Answer
"What will be the output of the following PHP code? <?php
$num = ""1""; $num1 = ""2""; print $num+$num1;
?>" 3 1+2 Error 12 2 co-2 2 1
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; Both i) and ii) " i), ii), iii) and iv)" Only iii) Only
i) 2 co-2 4 3
What does SPL stand for? Standard PHP Library Source PHP Library
Standard PHP List Source PHP List 1 co-2 1
Which of the following are valid function names? i) function() ii) �()
iii) .function() iv) $function() Only i) Only ii) i) and ii) iii) and
iv) 1 co-2 1 2
"What will be the output of the following PHP code? 1. <?php
2. $i = 2;
3. while (++$i)
4. {
5. while (--$i > 0)
6. print $i;
7. }
8. ?>" 210 10 no output infinite loop 3 co-2 4 4
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 " i), ii), iii) and iv)" Only ii) ii) and iii) " ii), iii)
and iv)" 1 co-2 1 4
Which version added the method getPrevious()? PHP 4 PHP 5 PHP 5.1
PHP 5.3 1 co-2 1 4
Which of the following statements invoke the exception class? throws new
Exception(); throw new Exception(); new Exception(); new throws Exception();
1 co-2 1 2
"What will be the output of the following PHP code? 1. <?php
2. define('IF', 42);
3. echo ""IF: "", IF;
4. ?>" IF:42 No output IF: ERROR 2 co-2 2 4
Who is the father of PHP? Rasmus Lerdorf Willam Makepiece Drek Kolkevi
List Barel 1 co-2 1 1
If $a = 12 what will be returned when ($a == 12) ? 5 : 1 is executed? 12 5
1 Error 1 co-2 3 2
Which of the below symbols is a newline character? \r \n /n /r
1 co-2 1 2
"What will be the output of the following PHP code? 1. <?php
2. define(""GREETING"", ""PHP is a scripting language"");
3. echo $GREETING;
4. ?> "
$GREETING no output PHP is a scripting language GREETING 3 co-2
3 2
Which one of the following functions will convert a string to all uppercase?
strtoupper() uppercase() str_uppercase() struppercase() 1
co-2 1 1
"What will be the output of the following PHP code? 1. <?php
2. echo str_pad(""Salad"", 5)."" is good."";
3. ?>" SaladSaladSaladSaladSalad is good is good SaladSaladSaladSaladSalad
is good?�Salad Salad?�is good 2 co-2 2 4
How should we add a single line comment in our PHP code? i) /?
ii) // iii) # iv) /* */ Only
ii) " i), iii) and iv)" " ii), iii) and iv)" Both ii) and iv) 1
co-2 1 3
How many methods are available for the exception class? 5 6 7 8
1 co-2 1 3
How many predefined exceptions does SPL provide access to? 13 14 15 16
1 co-2 1 1
Which one of the following is the right description for the method getMessage()?
Returns the message if it is passed to the constructor Returns the message if
it is passed to the class Returns the message if it is passed to the file
Returns the message if it is passed to the object 2 co-2 2 1
What will be the output of the following PHP code? 1. <?php 2. $i =
5; 3. while (--$i > 0 || ++$i) 4. { 5. print $i; 6. }
7. ?> 54321111111�.infinitely 555555555�infinitely 54321 5 3
co-2 3 1

S-ar putea să vă placă și