Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

PHP Exam Questions With Answers Graded A+

Rating
-
Sold
-
Pages
6
Grade
A+
Uploaded on
24-06-2024
Written in
2023/2024

PHP Exam Questions With Answers Graded A+ What does php stand for? PHP stands for PHP: Hypertext Preprocessor is PHP server side or client side scripting language? server side how are php files returned to the browser? PHP files are returned to the browser as plain HTML how is a php started and ended? A PHP scripting block always starts with ?php and ends with ? where can a php script be placed in the document? anywhere how must each php code line end? with a semi colon what is the purpose of the semi colon? it is a separator and used to distinguish one set of instructions from another what are two basic statements to output text with PHP? echo and print what happens if the php file has an html extension instead of PHP? the php code will not be executed how is a single line comment made in php? With // how is a comment block made? / / What are variables used for? Variables are used for storing values, such as numbers, strings or function results, so that they can be used many times in a script. what do all variables start with? All variables in PHP start with a $ sign symbol. The correct way of setting a variable in PHP: $var_name = value; is PHP strongly or loosely typed? loosely

Show more Read less
Institution
Course

Content preview

PHP Exam Questions With Answers Graded
A+
What does php stand for?
PHP stands for PHP: Hypertext Preprocessor


is PHP server side or client side scripting language?
server side


how are php files returned to the browser?
PHP files are returned to the browser as plain HTML


how is a php started and ended?
A PHP scripting block always starts with <?php and ends with ?>


where can a php script be placed in the document?
anywhere


how must each php code line end?
with a semi colon


what is the purpose of the semi colon?
it is a separator and used to distinguish one set of instructions from another


what are two basic statements to output text with PHP?
echo and print


what happens if the php file has an html extension instead of PHP?
the php code will not be executed


how is a single line comment made in php?
With //


how is a comment block made?
//


What are variables used for?
Variables are used for storing values, such as numbers, strings or function results, so that they can be
used many times in a script.


what do all variables start with?
All variables in PHP start with a $ sign symbol.


The correct way of setting a variable in PHP:

, $var_name = value;


is PHP strongly or loosely typed?
loosely


in php does a variable need to be declared (created) before being set?
no, php automatically creates the variable and sets it to the correct type.


What is meant by the term strongly typed?
variables have to be defined before they can be used


in php how must a variable name start?
A variable name must start with a letter or an underscore _


What kinds of characters can a variable name contain?
A variable name can only contain alpha-numeric characters and underscores (a-z, A-Z, 0-9, and _ )


should a variable name contain spaces?
no


if a variable name is more than one word how should it be formatted?
with an underscore between words or with the second word capitalized


What is a string variable used for?
A string variable is used to store and manipulate a piece of text.


What is the only string operator in php?
The concatenation operator (.)


What is the concatenation operator used for?
to put two string values together.


what are operators used for?
Operators are used to operate on values.


What kinds of different operators exist?
arithmetic, assignment, comparison, and logical


when should the if else statement be used?
if you want to execute a set of code when a condition is true and another if the condition is not true


when should the else if statement be used?
is used with the if...else statement to execute a set of code if one of several condition are true

Written for

Course

Document information

Uploaded on
June 24, 2024
Number of pages
6
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$11.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

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.
LectDan Teachme2-tutor
Follow You need to be logged in order to follow users or courses
Sold
220
Member since
3 year
Number of followers
157
Documents
7985
Last sold
1 month ago

4.0

47 reviews

5
25
4
12
3
2
2
3
1
5

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

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions