PHP Related Quiz
1. What does PHP stand for?
Personal Home Page
PHP: Hypertext Preprocessor
Private Hypertext Processor
Programmed Hypertext Page
2. Which symbol is used to begin a variable in PHP?
#
&
$
%
3. Which superglobal contains form data sent with method="post"?
$_GET
$_POST
$_FORM
$_REQUESTS
4. Which function is commonly used to output text in PHP?
print_r()
echo
write()
display()
5. How do you correctly end a PHP statement?
With a semicolon ;
With a colon :
With a comma ,
No ending character is needed
6. Which function returns the length of a string?
count()
size()
strlen()
length()
7. Which comparison operator checks both value and data type?
==
=
!=
===
8. Which loop is guaranteed to run at least once?
for
while
do...while
foreach
9. What is the correct way to start a PHP code block?
<script php>
<?php
<php>
<?
10. Which array function adds an item to the end of an array?
array_push()
array_add()
array_insert()
append_array()
Back to Home