Font size
WorksheetsJavaScript and PHP Quiz
Total questions: 24
Worksheet time: 30mins
Which of the following explains correctly what happens when a JavaScript program is developed on a Unix Machine?
will work perfectly well on a Windows Machine
will be displayed as JavaScript text on the browser
will throw errors and exceptions
must be restricted to a Unix Machine only
Which is a more efficient JavaScript code snippet?
Code 1
Code 2
Both Code 1 and Code 2
Cannot Compare
What will be the output of the following JavaScript code?
Which of the following is the correct way to add a comment in PHP code?
#
//
/* */
All of the mentioned
Which of the following is the default file extension of PHP files?
.php
.ph
.xml
.html
How to define a function in PHP?
functionName(parameters) {function body}
function {function body}
function functionName(parameters) {function body}
data type functionName(parameters) {function body}
What will be the output of the following PHP code?
Which is the right way of declaring a variable in PHP?
$3hello
$_hello
$this
$5_Hello
What will be the output of the following PHP program?
What will be the output of the following PHP program?
Which of the following PHP functions can be used for generating unique ids?
md5()
uniqueid()
mdid()
id()
In the following PHP program, what is/are the properties?
function sample()
echo “This is an example”;
public $name;
class Example
What will be the output of the following PHP code?
A function in PHP which starts with __ (double underscore) is known as __________
Default Function
User Defined Function
Inbuilt Function
Magic Function
How many functions does PHP offer for searching and modifying strings using Perl-compatible regular expressions.
10
7
8
9
Which of the following web servers are required to run the PHP script?
Apache and PHP
IIS
XAMPP
Any of the mentioned
What will be the output of the following PHP code snippet?
Which of the following PHP functions can be used to get the current memory usage?
memory_get_usage()
memory_get_peak_usage()
get_peak_usage()
get_usage()
Which one of the following PHP function is used to determine a file’s last access time?
filetime()
fileatime()
fileltime()
filectime()
What is PHP?
PHP is an open-source programming language
PHP is used to develop dynamic and interactive websites
PHP is a server-side scripting language
All of the mentioned
Who is the father of PHP?
Drek Kolkevi
Rasmus Lerdorf
Willam Makepiece
List Barely
What does PHP stand for?
PHP stands for Preprocessor Home Page
PHP stands for Pretext Hypertext Processor
PHP stands for Hypertext Preprocessor
PHP stands for Personal Hyper Processor
Which of the following is the correct syntax to write a PHP code?
Which of the following is the correct way to add a comment in PHP code?
#
//
/* */
All of the mentioned
