Search Header Logo

PHP Part 1

Authored by Abdul Nursyahid

University

Used 24+ times

PHP Part 1
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

11 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which one of the following statements about PHP syntax is TRUE?

A PHP script cannot be placed anywhere in the HTML document.

A PHP file normally contains PHP scripting codes only.

PHP commands are case sensitive.

Each statement in PHP must end with a semicolon.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which one of the following statements about PHP variables is FALSE?

Variables in PHP starts with a $ sign, followed by the name of the variable.

The variable name must begin with a letter or the underscore character.

Variable names are not case sensitive.

A variable name should not contain spaces.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you comment out a multiple lines of PHP codes?

\\ \\

\* *\

/* */

// //

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which one of the following built-in functions sorts an array by key in ascending order?

ksort()

asort()

krsort()

arsort()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which one of the following statements about PHP syntax is FALSE?

A PHP script always starts with <?php and ends with ?>.

A PHP file normally contains HTML tags, and some PHP scripting code.

Each statement in PHP must end with a semicolon.

PHP commands are case sensitive.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which one of the following variables is a VALID PHP variable?

<exampleVariable

%exampleVariable

$exampleVariable

?exampleVariable

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following lines of PHP codes?

' PHP’ rules!

$word rules!

echo PHP rules!

PHP rules!

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?