
PHP Basics and Forms
Quiz
•
Information Technology (IT)
•
University
•
Practice Problem
•
Easy
Joseph Andreas
Used 13+ times
FREE Resource
Enhance your content in a minute
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
What does PHP stand for?
Private Home Page
PHP Hypertext Preprocessor
Personal Hosting Protocol
Precompiled HTML Processor
Answer explanation
PHP originally stood for "Personal Home Page," but now it is a recursive acronym: "PHP Hypertext Preprocessor." It is a server-side scripting language mainly used for web development
2.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Which symbol is used to start a PHP script?
<!-- PHP -->
{ PHP }
<?php ?>
[PHP]
Answer explanation
Every PHP script must start with <?php and end with ?> to be executed correctly
3.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Which of the following is a valid variable name in PHP?
$1variable
$my_variable
my-variable
$my variable
Answer explanation
PHP variables must start with a dollar sign ($) and can only contain letters, numbers, and underscores. They cannot start with a number or contain spaces or hyphens
4.
MULTIPLE SELECT QUESTION
20 sec • 1 pt
How do you print text in PHP? (Select two correct answers)
echo "Hello World";
print("Hello World");
printf("Hello World");
display("Hello World");
Answer explanation
Both echo and print can be used to output text in PHP. printf is used for formatted output, while display() does not exist in PHP
5.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which of the following data types does PHP support?
String
Integer
Boolean
Array
Answer explanation
PHP supports multiple data types, including Strings, Integers, Booleans, Arrays, Objects, and more
6.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
What will be the output of the following PHP code?
$x = 5 + "5";
echo $x;
55
10
Error
5"5"
Answer explanation
In PHP, when a string containing a number is used in an arithmetic operation, it is automatically converted into an integer. So, "5" is converted to 5, and 5 + 5 = 10
7.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
What is the default file extension for PHP scripts?
.html
.php
.js
.py
Answer explanation
PHP scripts use the .php extension, allowing the server to process them before sending the output to the browser
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
15 questions
Python_MCQ_2
Quiz
•
University
20 questions
ML Use-Cases Quiz
Quiz
•
University
15 questions
STP_Integrasi aplikasi
Quiz
•
9th Grade - University
20 questions
Advance Database Concepts (BSIT 3)
Quiz
•
University
18 questions
Python: operadores y tipos de datos
Quiz
•
University
15 questions
P3 IAS 2 Quiz
Quiz
•
University
15 questions
Getting Familiar with GIT and GITHUB
Quiz
•
University
15 questions
Mastering Python Control Flow
Quiz
•
University
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
14 questions
General Technology Use Quiz
Quiz
•
8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
19 questions
Thanksgiving Trivia
Quiz
•
6th Grade
Discover more resources for Information Technology (IT)
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
9 questions
Principles of the United States Constitution
Interactive video
•
University
18 questions
Realidades 2 2A reflexivos
Quiz
•
7th Grade - University
10 questions
Dichotomous Key
Quiz
•
KG - University
25 questions
Integer Operations
Quiz
•
KG - University
7 questions
What Is Narrative Writing?
Interactive video
•
4th Grade - University
20 questions
SER vs ESTAR
Quiz
•
7th Grade - University
