Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

QUESTION 31 The array_pop() functions removes the element located at the end of

ID: 3600240 • Letter: Q

Question

QUESTION 31

The array_pop() functions removes the element located at the end of the array.

True

False

QUESTION 32

The array_keys() function returns an indexed array of all the keys in an associative array.

True

False

QUESTION 33

What gets printed?

$x = "Betelgeuse not Beetlejuice";
echo $x[18];

-1

t

l

e

QUESTION 34

"To sort an associative array by key, use the ____ function."

natsort()

ksort()

rsort()

asort()

QUESTION 35

In this function header _____.

function getStuff($soup = "tomato", $cheese = "Velveta") { ...

$soup and $cheese called arguments

$soup and $cheese called default arguments

$soup and $cheese called default parameters

$soup and $cheese called global parameters

QUESTION 36

What does the variable $y hold?

$x = "person5@xyz.com";
$m = "@";
$y = strstr($x, $m, true);

@xyz.com

person5@

xyz.com

person5

QUESTION 37

A variable's scope can be either _____ or ____. Choose 2 answers.

local

undeclared

universal

global

QUESTION 38

A return statement returns a value to the statement that called the function.

True

False

QUESTION 39

To post a page to itself you have the action attribute the same as the page name.

True

False

QUESTION 40

Would a parameter list like the following work?

function getStuff($soup = "tomato", $cheese) { …

yes

no

-1

t

l

e

Explanation / Answer

Question 31 : True
Question 32 : True
Question 33 : t
Question 34 : ksort()
Question 35 : $soup and $cheese called arguments
Question 36 : person5
Question 37 : local or global
Question 38 : True
Question 39 : True
Question 40 : No

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote