PHP Basics Quiz lec 1 to 3

PHP Basics Quiz lec 1 to 3

2nd Grade

30 Qs

quiz-placeholder

Similar activities

Superlative, comparative and positive

Superlative, comparative and positive

1st - 4th Grade

27 Qs

Regular Verbs in the Past Tense - Practice

Regular Verbs in the Past Tense - Practice

KG - 6th Grade

35 Qs

PEMROGRAMAN DASAR

PEMROGRAMAN DASAR

1st - 10th Grade

30 Qs

Test your bond with Ritisha

Test your bond with Ritisha

1st - 12th Grade

30 Qs

Library Review

Library Review

2nd - 4th Grade

25 Qs

Mwd theory practice

Mwd theory practice

1st - 12th Grade

32 Qs

Bilingual Supplemental 164- Competencies 1-3

Bilingual Supplemental 164- Competencies 1-3

KG - 5th Grade

27 Qs

PHP Basics Quiz lec 1 to 3

PHP Basics Quiz lec 1 to 3

Assessment

Quiz

Other

2nd Grade

Medium

Created by

IIT22027 K.G.D.S.

Used 1+ times

FREE Resource

AI

Enhance your content

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the concatenation operator (.) in PHP?

To add two numbers together.

To join two or more strings.

To perform a comparison.

To divide two numbers.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is an example of a valid PHP variable name?

$1variable

$-variable

$_variable

$variable-name

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to end a PHP statement?

A colon (:)

A comma (,)

A semicolon (;)

A period (.)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you print data to the browser in PHP?

print() or echo

write() or output()

display() or show()

return()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary difference between var_dump() and echo?

echo displays a value, while var_dump() displays value and data type.

echo is used for debugging, while var_dump() is for outputting to the browser.

echo can only display strings, while var_dump() can display all data types.

There is no difference.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is an example of an associative array in PHP?

$age = ["Peter" => 35, "Ben" => 37];

$age = array("Peter", "Ben");

$age = new Array("Peter", "Ben");

$age = ("Peter", "Ben");

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of echo $x; if $x is assigned the value (int) "100.5"?

100.5

100

"100"

An error will occur.

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?