FUNCTION PHP

FUNCTION PHP

2nd Grade

8 Qs

quiz-placeholder

Similar activities

WordPad 3 Grade 2

WordPad 3 Grade 2

2nd Grade

8 Qs

e14 styczeń 2017

e14 styczeń 2017

1st - 5th Grade

13 Qs

ICT P2: Topic 5 - Recording & Presentation

ICT P2: Topic 5 - Recording & Presentation

2nd Grade

12 Qs

Administrasi Infrastruktur Jaringan

Administrasi Infrastruktur Jaringan

1st - 10th Grade

10 Qs

Hari 3 - Kuis Coding & Perkenalan AI - Fitri Yanti

Hari 3 - Kuis Coding & Perkenalan AI - Fitri Yanti

1st - 12th Grade

12 Qs

Excel Parts

Excel Parts

1st - 4th Grade

10 Qs

Grade 2 Term 4 Quiz

Grade 2 Term 4 Quiz

2nd Grade

10 Qs

Soccer Test!!!

Soccer Test!!!

1st - 6th Grade

12 Qs

FUNCTION PHP

FUNCTION PHP

Assessment

Quiz

Computers

2nd Grade

Practice Problem

Medium

Created by

ANIS (PBU)

Used 4+ times

FREE Resource

AI

Enhance your content in a minute

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

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of a PHP function?

To store variables

To execute a specific task

To print HTML code

To create classes

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to declare a function in PHP?

method

func

def

function

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is true about function names in PHP?

They cannot start with a number

They cannot contain special characters

They are case-insensitive

They must always start with a dollar sign ($)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the keyword "return" do in a PHP function?

It terminates the function

It echoes a message

It sends a value back to the calling code

It generates an error

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements about parameters in PHP functions is true?

Functions cannot accept parameters

Parameters are optional

Parameters are enclosed in curly braces {}

Parameters are placeholders for values passed to the function

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the "global" keyword in PHP functions?

To declare a variable as local to the function

To access a variable declared outside of the function

To define a constant

To include another PHP file

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the default scope of a PHP function if no scope is specified?

Global

Local

Protected

Private

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?