Categories
Tests
Leaderboards
Projects
About
Hello, Guest
Login
Categories
Tests
Leaderboards
Projects
About
Login
← Back to Programming & Development
Beginner
~6 min
PHP Basics
Core PHP understanding for real-world web dev.
View leaderboard
Progress:
0
/12
Beginner • ~6 min
Q1. What does PHP stand for (originally)?
Select one answer • 1 pt
Private Home Page
Programming Hypertext Processor
Preprocessed Hypertext Page
Personal Home Page
Q2. Which symbol is used to start a variable in PHP?
Select one answer • 1 pt
$
%
@
#
Q3. Which function outputs text to the browser in PHP?
Select one answer • 1 pt
output()
echo
write()
printf()
Q4. Which superglobal contains data sent by an HTML form using method="POST"?
Select one answer • 1 pt
$_GET
$_POST
$_SERVER
$_REQUEST_URI
Q5. What will strlen("SmartAssess") return?
Select one answer • 1 pt
11
9
8
10
Q6. Which operator is used for concatenation in PHP?
Select one answer • 1 pt
&
+
::
.
Q7. Which statement properly checks if a key exists in an array?
Select one answer • 1 pt
in_array("a", $arr)
array_key_exists("a", $arr)
key_in_array("a", $arr)
array_has("a", $arr)
Q8. What does isset($x) return when $x is null?
Select one answer • 1 pt
true
false
throws an error
null
Q9. Which function would you use to safely escape output for HTML to prevent XSS?
Select one answer • 1 pt
urldecode()
htmlentities_decode()
strip_tags()
htmlspecialchars()
Q10. In PHP, what does PDO primarily provide?
Select one answer • 1 pt
A templating engine for HTML
A database access layer (with prepared statements)
A CSS framework
A CLI-only routing system
Q11. Which is the correct way to start a PHP session?
Select one answer • 1 pt
session_begin();
init_session();
session_start();
start_session();
Q12. Which superglobal is commonly used for data submitted via POST?
Select one answer • 1 pt
$_POST
$_SERVER
$_GET
$_FILES
Cancel
Submit answers