$4cso1-PhpQuiz

$4cso1-PhpQuiz

Professional Development

10 Qs

quiz-placeholder

Similar activities

python quiz

python quiz

6th Grade - Professional Development

10 Qs

Scratch

Scratch

KG - Professional Development

10 Qs

BAI 3 K12 (TT)

BAI 3 K12 (TT)

Professional Development

10 Qs

Enhancing Windows Productivity

Enhancing Windows Productivity

1st Grade - Professional Development

10 Qs

Java Server Page

Java Server Page

Professional Development

10 Qs

MTA: 98-367 Security Part 3

MTA: 98-367 Security Part 3

KG - Professional Development

15 Qs

DECI - Week 2 - round

DECI - Week 2 - round

Professional Development

10 Qs

Web Technology - Web Essentials

Web Technology - Web Essentials

Professional Development

15 Qs

$4cso1-PhpQuiz

$4cso1-PhpQuiz

Assessment

Quiz

Computers

Professional Development

Practice Problem

Hard

Created by

RAVIKANTH K

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

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

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt


What is the correct way to declare a variable in PHP?

int $varName

$varName

declare $varName

var $varName

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following PHP code?
<?php

$x = "Hello";
$y = 'World';
echo $x . " " . $y;
?>

HelloWorld

Hello World

Error

Hello+World

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Consider the PHP array:
$arr = array(1, 2, 3, 4);
What is the correct way to access the third element?

$arr[2]

$arr[3]

$arr(3)

$array[2]

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Whats the output of the below code?

<?php for ($i = 0; $i <= 10; $i++) {

echo $i; } echo $i;

?>

0,1,2,3,4,5,6,7,8,9,10,11

No Error

Syntax error in loop

Undefined variable outside loop

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What method should be used to send sensitive data in a form?

GET

POST

PUT

DELETE

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function is used to erase all session variables stored in the current session?

session_destroy()

session_change()

session_remove()

session_unset()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which one of the following statements should you use to set the session username to "SAM"

$SESSION[‘username’] = “SAM”;

$_SESSION[‘username’] = “SAM”;

session_start(“SAM”);

$SESSION_START[“username”] = “SAM”;

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?