1/34
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
What does PHP standfor
PHP: Hypertext Preprocessor
Where is PHP code executed
On the server
What does the browser receive after PHP executes?
Plain HTML
What file extension do PHP files use
.php
What tags begin and end a PHP script
<?php and ?>
How does every PHP statement end
With a semicolon (;)
Are PHP variable names case-sensitive
Yes
Are PHP keywords case-sensitive?
No
What are the two main output statements in PHP?
echo and print
Which is slightly faster: echo or print?
echo
Which statement has no return value?
echo
Which statement returns 1?
How do PHP variables begin?
With the $ symbol
Does PHP require variable declarations?
No
When is a variable created in PHP?
When it is first assigned a value.
Can a PHP variable begin with a number?
No
Is PHP loosely typed or strongly typed?
Loosely typed.
Which function displays a variable's type and value?
var_dump()
Name the basic PHP data types
String, Integer, Float, Boolean, Array, Object, NULL, Resource
What are the three variable scopes in PHP?
Local, Global, Static
Where can a local variable be accessed
Only inside the function where it is declared
Where can a global variable normally be accessed
Outside functions
Which keyword allows access to global variables inside a function?
global
What does the static keyword do?
Keeps a local variable's value between function calls.
What are PHP superglobals?
Predefined variables accessible from anywhere
Name five PHP superglobals
$GLOBALS
$_POST
$_GET
$_SESSION
$_SERVER
What is $GLOBALS
An array containing all global variables
How do you create a constant
Using define() or const
Do constants use the $ symbol
No
What conditional statements does PHP support?
if
if...else
if...elseif...else
switch
What loops does PHP support?
while
do...while
for
foreach
Which keyword defines a class?
class
What are the two modern ways PHP connects to MySQL?
MySQLi and PDO
Which connection method only works with MySQL
MySQL
What is the difference between echo and print?
echo is slightly faster, has no return value, and can output multiple parameters. print returns 1 and only accepts one argument