Question: QUESTION 1 You can insert an array variable's value into a double quoted string by enclosing the variable in _____. { } ( ) <
QUESTION 1
You can insert an array variable's value into a double quoted string by enclosing the variable in _____.
| { } | ||
| ( ) | ||
| < > | ||
| [ ] |
QUESTION 2
What is printed?
$str1 = "pizza"; echo "Eat more {$str1}s";
| Eat more {$str1}s | ||
| Eat more pizzas | ||
| Eat more pizza
|
QUESTION 3
"Global variables are automatically available to all parts of your program, including functions."
True
False
QUESTION 4
When this code runs, what is the value of $y?
$user = "Don"; $pw = "12345"; $y = sprintf("SELECT * FROM users WHERE user='%s' AND password='%s'", $user, $pw);
| SELECT * FROM users WHERE user='%s' AND password='%s' | ||
| SELECT * FROM users WHERE user=Don AND password=12345 | ||
| SELECT * FROM users WHERE user='Don' AND password='12345' | ||
| None of the other answer are correct
|
QUESTION 5
What does this code output?
$x = explode(" ", "fe fi fo fum"); echo $x[2];
| fi | ||
| fo | ||
| fe | ||
| fum | ||
| nothing |
QUESTION 6
All functions must return a value.
True
False
QUESTION 7
_____ is the term for the location that a declared variable can be used.
| none of these | ||
| variable scope | ||
| variable type | ||
| variable duration |
QUESTION 8
Include statements support only absolute path notation.
True
False
QUESTION 9
The include statement and the require statement perform the same function and can be used interchangeably.
True
False
QUESTION 10
"In PHP, you must declare a global variable with the global keyword inside a function definition for the variable to be available within the scope of that function."
True
False
QUESTION 11
A function executes automatically.
True
False
QUESTION 12
"heredoc structures allow printing large chunks of text without having to escape anything, variable values are still inserted."
True
False
QUESTION 13
Function parameters are global variables.
True
False
QUESTION 14
What gets printed?
$x = "Betelgeuse not Beetlejuice"; echo $x[18];
| t | ||
| e | ||
| l | ||
| " " |
QUESTION 15
The $_POST[] array is an associative array called a superglobal array.
True
False
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
