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.0
PHP 8.3
PHP 5.6
How to define a string variable in PHP?
string $var = "text";
String $var = "text";
str $var = "text";
$var = "text";
Which function converts string to uppercase?
strtoUpper()
strtoupper()
upperCase()
toUpperCase()
What does strlen() function return?
Number of bytes
Number of characters in string
Number of words
Number of lines
What types of arrays exist in PHP?
Only indexed
Indexed and Associative
Mixed
Only associative
How to properly connect to MySQL?
mysql (deprecated)
Via HTTP
mysqli or PDO
Via SQL
What is SQL Injection?
SQL organization
Injection of malicious code via SQL queries
SQL error
Low version of SQL
What is isset() function used for?
Restore variable
Set a variable
Check if variable is set
Delete variable
What is $_GET superglobal in PHP?
Data from URL
Data from POST method
Data from GET method
Data from file
What is a session in PHP?
Response to request
HTTP connection
Permanent storage
Temporary user data storage
What is the difference between isset() and empty()?
isset() checks existence, empty() checks value
They are the same
No difference
empty() checks existence
How to iterate through array in PHP?
map
while
for
foreach
What is a function in PHP?
Constant
Variable
Reusable block of code
Class
How to declare a function in PHP?
def name() {}
function: name() {}
func name() {}
function name() {}
What is OOP in PHP?
Operation-Organized Package
Open-Operated Program
Object-Oriented Programming
Output-Optimized Program
What is a class in PHP?
Function
Template for objects
Variable
Constant
What is inheritance in OOP?
Unexpected transfer
Introduction
Duplication
Getting properties from parent class
What are access modifiers?
Control access to properties
Types of functions
Part of SQL command
Variable type
How to write else if in PHP?
elseif
elif
else-if
else if
What is a constructor in a class?
__construct()
__create()
__init()
__new()
What is namespace in PHP?
Space for avoiding naming conflicts
Function constructor
Data type
Local scope
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