Search Header Logo

Web Programming

Authored by Julius Codilan

Instructional Technology

University

Used 2+ times

Web Programming
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of this PHP code: echo strtr("abc", "abc", "123");

abc

123

132

a1b2c3

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Function to split string using regex?

preg_split()

preg_regex()

preg()

split()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will str_repeat("PHP", 3); return?

PHP

PHP PHP PHP

PHP3

PHPPHPPHP

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function finds the last occurrence of a substring in a string?

substr()

strpos()

strrpos()

strlastpos()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of:

$str = "hello world"; echo substr($str, -5, 3);

wor

rld

llo

orl

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the use of heredoc syntax in PHP?

Error handling

Embedding variables in strings easily

Faster looping

Importing files

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which loop is guaranteed to run at least once?

For

Foreach

While

do...While

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?