ArmWeb
News
Video lessons
Quizzes
Messenger
Forum
Site order
Advertising
Contact
About Developer
Sitemap
Login
Register
◀ Back to list
Quiz: Basic PHP questions
Core PHP ideas and use in web development.
Which version of PHP is most stable?
PHP 7.4
PHP 8.3
PHP 8.0
PHP 5.6
How to define a string variable in PHP?
String $var = "text";
str $var = "text";
$var = "text";
string $var = "text";
Which function converts string to uppercase?
strtoupper()
upperCase()
strtoUpper()
toUpperCase()
What does strlen() function return?
Number of words
Number of characters in string
Number of bytes
Number of lines
What types of arrays exist in PHP?
Mixed
Only associative
Indexed and Associative
Only indexed
How to properly connect to MySQL?
Via HTTP
Via SQL
mysqli or PDO
mysql (deprecated)
What is SQL Injection?
SQL error
Injection of malicious code via SQL queries
SQL organization
Low version of SQL
What is isset() function used for?
Delete variable
Check if variable is set
Set a variable
Restore variable
What is $_GET superglobal in PHP?
Data from GET method
Data from URL
Data from POST method
Data from file
What is a session in PHP?
HTTP connection
Temporary user data storage
Response to request
Permanent storage
What is the difference between isset() and empty()?
No difference
isset() checks existence, empty() checks value
They are the same
empty() checks existence
How to iterate through array in PHP?
for
foreach
map
while
What is a function in PHP?
Variable
Reusable block of code
Class
Constant
How to declare a function in PHP?
func name() {}
function: name() {}
function name() {}
def name() {}
What is OOP in PHP?
Output-Optimized Program
Object-Oriented Programming
Operation-Organized Package
Open-Operated Program
What is a class in PHP?
Template for objects
Constant
Function
Variable
What is inheritance in OOP?
Unexpected transfer
Duplication
Introduction
Getting properties from parent class
What are access modifiers?
Part of SQL command
Variable type
Types of functions
Control access to properties
How to write else if in PHP?
else-if
elseif
else if
elif
What is a constructor in a class?
__init()
__create()
__new()
__construct()
What is namespace in PHP?
Function constructor
Data type
Local scope
Space for avoiding naming conflicts
Submit answers
Top participants
10
50
100
All
#
Participant
Score
%
1
admin
5 / 21
23.81%
2
admin
3 / 21
14.29%
Delete
Cancel
Delete
!
Support
ArmWeb Support
ArmAI assistant
×
ArmAI
Administrator
ArmAI answers only ArmWeb site and support questions.
Hi, I am ArmAI, the ArmWeb support assistant. I can help with registration, login, profile, news, video lessons, quizzes, site orders, or advertising.
Send