
PHP 8 OOP Quiz
Quiz
•
Information Technology (IT)
•
Professional Development
•
Medium
Cecilio Salonoy
Used 2+ times
FREE Resource
38 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is one of the main advantages of PHP 8 over its previous versions?
Reduced file size
JIT Compiler for improved performance
Better browser support
New file system
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which feature allows passing arguments based on parameter names in PHP 8?
Match Expressions
Named Arguments
Union Types
Default Parameters
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a class in PHP OOP?
A variable
A data type
A blueprint for creating objects
A loop structure
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What keyword is used to create a class instance?
static
this
new
get
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of this code? $car = new Car("red", "Toyota"); echo $car->getDescription();
Toyota red car
This car is a red Toyota.
Car object created
red Toyota
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the __construct method in a class?
To delete properties
To initialize object properties
To print the class
To inherit another class
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given this code snippet: function foo(int|float $value): int|float { return $value; } echo foo(3.5); //What will be the output?
int
3.5
Error
Float
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
Popular Resources on Wayground
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
20 questions
MINERS Core Values Quiz
Quiz
•
8th Grade
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
20 questions
Multiplying and Dividing Integers
Quiz
•
7th Grade
10 questions
How to Email your Teacher
Quiz
•
Professional Development
15 questions
Order of Operations
Quiz
•
5th Grade
Discover more resources for Information Technology (IT)
10 questions
How to Email your Teacher
Quiz
•
Professional Development
21 questions
October 25
Quiz
•
Professional Development
10 questions
October Monthly Quiz
Quiz
•
Professional Development
20 questions
There is There are
Quiz
•
Professional Development
5 questions
SSUSH13
Interactive video
•
Professional Development
10 questions
Halloween Trivia
Quiz
•
Professional Development
