
PHP Basics Quiz lec 1 to 3
Quiz
•
Other
•
2nd Grade
•
Medium
IIT22027 K.G.D.S.
Used 1+ times
FREE Resource
Enhance your content
30 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the concatenation operator (.) in PHP?
To add two numbers together.
To join two or more strings.
To perform a comparison.
To divide two numbers.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is an example of a valid PHP variable name?
$1variable
$-variable
$_variable
$variable-name
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to end a PHP statement?
A colon (:)
A comma (,)
A semicolon (;)
A period (.)
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you print data to the browser in PHP?
print() or echo
write() or output()
display() or show()
return()
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the primary difference between var_dump() and echo?
echo displays a value, while var_dump() displays value and data type.
echo is used for debugging, while var_dump() is for outputting to the browser.
echo can only display strings, while var_dump() can display all data types.
There is no difference.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is an example of an associative array in PHP?
$age = ["Peter" => 35, "Ben" => 37];
$age = array("Peter", "Ben");
$age = new Array("Peter", "Ben");
$age = ("Peter", "Ben");
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of echo $x; if $x is assigned the value (int) "100.5"?
100.5
100
"100"
An error will occur.
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple

Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
32 questions
End of the Year!
Quiz
•
1st - 5th Grade
25 questions
Trivia For Kids!
Quiz
•
1st - 6th Grade
25 questions
Gk
Quiz
•
2nd - 11th Grade
25 questions
3rd Grade Review
Quiz
•
2nd - 3rd Grade
25 questions
Data Types
Quiz
•
1st - 5th Grade
27 questions
Are You Smarter Than a 2nd Grader? (MASTER)
Quiz
•
1st - 2nd Grade
26 questions
Recess Expectations
Quiz
•
2nd Grade
29 questions
IQ Quiz for Grade 1
Quiz
•
1st - 5th Grade
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
20 questions
ELA Advisory Review
Quiz
•
7th Grade
15 questions
Subtracting Integers
Quiz
•
7th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
Discover more resources for Other
10 questions
Verbs
Quiz
•
2nd Grade
11 questions
NFL Football logos
Quiz
•
KG - Professional Dev...
20 questions
addition
Quiz
•
1st - 3rd Grade
20 questions
Subject and predicate in sentences
Quiz
•
1st - 3rd Grade
20 questions
Place Value
Quiz
•
KG - 3rd Grade
10 questions
Exploring Force and Motion Concepts
Interactive video
•
1st - 5th Grade
30 questions
Multiplication Facts 1-12
Quiz
•
2nd - 5th Grade
10 questions
Exploring Properties of Matter
Interactive video
•
1st - 5th Grade