100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.6 TrustPilot
logo-home
Exam (elaborations)

PHP EXAM QUESTIONS AND ANSWERS

Rating
-
Sold
-
Pages
6
Grade
A+
Uploaded on
23-01-2026
Written in
2025/2026

PHP EXAM QUESTIONS AND ANSWERS

Institution
PHP
Course
PHP









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
PHP
Course
PHP

Document information

Uploaded on
January 23, 2026
Number of pages
6
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

PHP EXAM QUESTIONS AND ANSWERS

How many of the following statements are true for PHP operators? x+=y is the same as
x=x+y x=-y is the same as x=x-y x.=y is the same as x=x.y

1 2 or 3 - Answers -3

In PHP, a constant is set by the - Answers -define()function

t or f

In MySQL, the AND operator displays a record if ALL conditions listed are true. -
Answers -true

In PHP, ID keys in arrays are always assigned automatically. - Answers -true

How many of the following statements are true for PHP? PHP can only run on a Apache
server. PHP is a W3C standard. A PHP file has the file extension ".php". PHP scripts
are executed on the server.

1
2
3
4 - Answers -3

In MySQL, how to return all the records from a table named "Customers" sorted
REVERSE alphabetically by "FirstName"? - Answers -

t or f

In PHP, the setcookie() function must appear BEFORE the <html> tag. - Answers -

Which of the following is true for PHP variables?

Unless a data type is declared, it will be set to String as default
The data type is declared automatically when you use the variable
A variable must always be declared before being used - Answers -

What PHP function fetches a result row (from a MySQL connection) as an associative
array, a numeric array, or both? - Answers -

What PHP function is used to open a new connection to the MySQL server? - Answers
-

In MySQL, how to select all columns from a table named "Customers"?

, Group of answer choicesSELECT * CustomersSELECT * FROM CustomersSELECT
[all] FROM Customers - Answers -

In PHP, large comment blocks are defined by:
Group of answer choices<comment> and </comment>// and \\/* and */<!-- and --> -
Answers -

In PHP, a timestamp can be made with the
Group of answer choicessetdate() functionmktime() functiontimestamp() function -
Answers -

A MySQL connection in PHP will automatically close when the script ends.
Group of answer choicesTrueFalse - Answers -

Which of the following is NOT a valid variable name in PHP?
Group of answer choices$salesPerWeek$sales_per_week$sales-per-week - Answers -

All variables in PHP start with which symbol?
Group of answer choices&#$! - Answers -

In MySQL, how to select all the records from a table named "Customers" where
"FirstName" starts with an "a"?
Group of answer choicesSELECT * FROM Customers WHERE
FirstName=''a%''SELECT * FROM Customers WHERE FirstName LIKE ''a%''SELECT *
FROM Customers WHERE FirstName LIKE ''a'' - Answers -

What is the correct way to create a function in PHP?
Group of answer choicescreate myFunction()new_function myFunction()function
myFunction() - Answers -

What does PHP stand for? - Answers -PHP: Hypertext Preprocessor

In PHP, you can get the value of a constant with the
Group of answer choicesconstant() functionconstant_value() functionget_constant()
function - Answers -

In PHP, you can get the value of a constant with the - Answers -Constant () function

In MySQL, which keyword is used to sort the result?
Group of answer choicesSORT BYORDERORDER BYSORT - Answers -

How do you write "Hello World" in PHP?
Group of answer choicesResponse.Write("Hello World");output "Hello World";echo
"Hello World"; - Answers -

In MySQL, what is the proper syntax for inserting new data in a database?

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
GEEKA YALA UNIVERSITY
View profile
Follow You need to be logged in order to follow users or courses
Sold
2013
Member since
3 year
Number of followers
1447
Documents
48584
Last sold
12 hours ago

3.8

345 reviews

5
172
4
61
3
44
2
16
1
52

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions