Sie sind auf Seite 1von 8

1. PHP Stands for?

A. PHP Hypertex Processor


B. PHP Hyper Markup Processor
C. PHP Hyper Markup Preprocessor
D. PHP Hypertext Preprocessor
2. PHP is an example of ___________ scripting language.
A. Server-side
B. Client-side
C. Browser-side
D. In-side
3. Which of the following is not true?
A. PHP can be used to develop web applications.
B. PHP makes a website dynamic
C. PHP applications cannot be compile
D. PHP cannot be embedded into html.
4. PHP scripts are enclosed within _______
A. <php> . . . </php>
B. <?php . . . ?>
C. ?php . . . ?php
D. <p> . . . </p>
5. Which of the following variables is not a predefined variable?
A. $get
B. $ask
C. $request
D. $post
6. Which of the following method sends input to a script via a URL?
A. Get
B. Post
C. Both
D. None
7. What will the following code output?

A. Error
B. My name is BobBob
C. My name is BobMy name is Bob
D. My name is Bob Bob
8. Which of the following PHP statements will output Hello World on the screen?
i) echo (Hello World);
ii) print (Hello World);
iii) printf (Hello World);
iv) sprintf (Hello World);
A. i)and ii)
B. i), ii) and iii)
C. All of the mentioned
D. i), ii) and iv)
9. What will be the output of the following PHP code?

<?php
$color = "maroon";
$var = $color[2];
echo "$var";
?>

A. a
B. Error
C. $var
D. R

10. What will be the output of the following PHP code?

<?php
$a = "clue";
$a .= "get";
echo "$a";
?>
A. get

B. true

C. false

D. clueget

11. What will be the output of the following PHP code?

<?php
$total = "25 students";
$more = 10;
$total = $total + $more;
echo "$total";
?>
A. Error

B. Students
C. 35

D. 25 students

12. Which two predefined variables are used to retrieve information from forms?
A. $GET & $SET
B. $_GET & $_SET
C. $__GET & $__SET
D. GET & SET

13. What will be the output of the following PHP code ?

<?php
echo "Hello world </br> I am learning PHP";
?>
A. Hello world

B. Hello world I am learning PHP

C. Error

D. Hello world

I am learning PHP

14. What will be the output of the following PHP code ?

<?php
echo "Hello world <strong>I am learning PHP</strong>"
?>
A. Hello world
B. Hello world I am learning PHP
C. Hello world
I am learning PHP
D. Error
15. What will be the output of the following PHP code ?

<?php
echo "This", "was", "a", "bad", "idea";
?>
A. This, was, a, bad, idea

B. This was a bad idea

C. Thiswasabadidea
D. Error

16. What will be the output of the following PHP code ?

<?php
echo "This"."was"."a"."bad"."idea";
?>
A. This, was, a, bad, idea

B. This was a bad idea

C. Thiswasabadidea

D. Error

17. What will be the output of the following PHP code ?

<?php
$one = "Hello";
$two = "World";
echo $one, $two;
?>
A. Hello World

B. Hello

C. World

D. HelloWorld

18. What will be the output of the following PHP code ?

<?php
$one = "Hello";
$two = "World";
echo "$one$two";
?>

A. HelloWorld
B. $one$two
C. Hello
D. Error
19. What will be the output of the following PHP code ?

<?php
$one = "Hello";
$two = "World";
echo "$one"+"$two";
?>

A. HelloWorld
B. Hello+World
C. 0
D. Error
20. What will be the output of the following PHP code ?

<?php
echo "This is <i>India</i>";
?>

A. This is India
B. This is Ind
C. This is
D. Error

21. What will be the output of the following PHP code ?

<?php
$cars = array("Volvo", "BMW", "Toyota");
echo "My car is a {$cars[0]}";
?>

A. My car is a Volvo
B. My car is a BMW
C. My car is a Toyota
D. Error

22. What will be the output of the following PHP code ?

<?php
print "echo hello world";
?>
A. echo hello world

B. hello world

C. Nothing

D. Error

23. What will be the output of the following PHP code ?

<?php
$one = 1;
print($one);
print $one;
?>
A. 01

B. 11

C. 10

D. Error

24. What will be the output of the following PHP code ?

<?php
$cars = array("Volvo", "BMW", "Toyota");
print $cars[2];
?>
A. Volvo

B. BMW

C. Toyota

D. Error

25. What will be the output of the following PHP code ?

<?php
$one = "one";
$two = "two";
print($one$two);
?>
A. onetwo

B. one

C. Nothing

D. Error

26. What will be the output of the following PHP code ?

<?php
$one = "one";
$two = "two";
print($one,$two);
?>
A. onetwo
B. one, two

C. one

D. Error

27. What will be the output of the following PHP code ?

<?php
$one = "one";
$two = "two";
print("$one$two");
?>
A. onetwo

B. $one$two

C. One

D. Error

28. What will be the output of the following PHP code ?

<?php
$one = "one";
$two = "two";
print($one==$two);
?>
A. true

B. false

C. Nothing

D. Error

29. What will be the output of the following PHP code ?

<?php
$one = "one";
$two = "one";
print($one == $two);
?>
A. true

B. false
C. 1

D. Error

30. What will be the output of the following PHP code ?

<?php
print "Hello world!<br>";
print "I'm about to learn PHP!";
?>

A. Hello world!

Im about to learn PHP!

B. Hello world! Im about to learn PHP!


C. Hello world!
Im about to learn PHP!
D. Error

Das könnte Ihnen auch gefallen