Professional Documents
Culture Documents
Email *
badhri.82102031@srit.org
NAME:
Badhri S
a) Drek Kolkevi
b) Rasmus Lerdorf
c) Willam Makepiece
d) List Barely
3. What does PHP stand for? * 1/1
4. Which of the following is the correct syntax to write a PHP code? 0/1
a) <?php ?>
d) <? ?>
Correct answer
d) <? ?>
5. Which of the following is the correct way to add a comment in PHP 1/1
code?
a) #
b) //
c) /* */
a) .php
b) .ph
c) .xml
d) .html
<?php
$x = 10;
$y = 20;
else
?>
b) Welcome to Sanfoundry
d) error
a) no output
a) $3hello
b) $_hello
c) $this
d) $5_Hello
10. What will be the output of the following PHP program? 0/1
<?php
?>
a) 6
b) 5
c) 4
d) 3
Correct answer
a) 6
a.echo
b.write
c. print
+ (plus)
* (Asterisk)
. (dot)
append()
13) Which of the following is the correct way to create a function in PHP? * 1/1
function myFunction ()
Create myFunction()
New_function myFunction()
14.Which of the following function in PHP can be used to test the type of 1/1
any variable?
a. showtype()
b. gettype()
c. settype()
Correct answer
16. Which of the following is the correct way to open the file "sample.txt" *1/1
as readable?
fopen("sample.txt", "r+");
fopen("sample.txt", "r");
fopen("sample.txt");
fopen("sample.txt", "read");
17. Which of the following is a built-in function in PHP that adds a value *1/1
to the end of an array?
a. array_push()
b. inend_array()
c. into_array()
c. Hi
19..<?php 0/1
$a = array(16, 5, 2);
echo array_product($a);
?>
a.160
b.1652
c80
d.32
Correct answer
a.160
20.Which of the following is the correct way to print "Hello World" in PHP? * 1/1
write("Hello World")
This form was created inside of Sri Ramakrishna Institute of Technology. Report Abuse
Forms