PHP Ch 1 MidTerm

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

What value do the print statement statement return if it is successful?

1 It will return a 0 if unsuccessful. Remember echo will not return any value if successful or not.

What is the short PHP script delimiter?

<? ?> Note these cannot be used with XML documents, you must use <?php ?> script delimiters

What is the definition for the term "function" ?

A subroutine (or individual statements grouped into a logical unit) that performs a specific task.

What does CGI standfor?

Common Gateway Interface

You cannot use HTML formatting elements as part of the echo or print statements. True or False

False You can use the HTML elements to format the output of echo or print statements

What does PHP stand for?

Hypertext Preprocessor

Why should you avoid using the .php extension if the document contains only HTML code?

If the document has an extension of .php it will be sent to the scripting enging on the server. If it does not contain any PHP code, it causes unnecessary overhead on the server

Define the term "embedded language" as it applies to PHP

JavaScript and PHP are both referred to as embedded languages because: -code for both languages is embedded within a HTML Web page

What is a literal string?

Text that is contained within double or single quotes.

Why do you not see any PHP code when you view the source code of a PHP page int he browser?

The PHP code is never sent back to a client's Web broswer; only the resulting Web page that is generated from the PHP code and HTML elements found in the PHP code are returned to the client.

What is a programming language construct?

These are built in features of the programming language. Example: echo and print statements

What is the reason to include echo or print statements in your code block?

To include the results of a PHP script within a Web page that is returned to a client.

PHP, along with other programming languages, including C++ and Java, requires you to end all statements with semicolon. True or False

True Note the primary purpose of the semicolon is to identify the end of the statement, NOT the end of the line

To execute a PHP function, you must first invoke, or call, it from somewhere in your script. True or False

True The statement that calls a function is referred to as a function call and consists of the function name followed by any arguments or actual parameteres in parentheses and separated by commas.

What is the standard for exchanging data on the Internet?

XML

Does the PHP scripting enging ignore white space within the PHP code blocks? Yes or No

Yes

Does PHP contain any built in functions? Yes or No

Yes PHP includes numerous built-in functions that perform various types of tasks

Is the following standard PHP script deliminator: <?php ?> Yes or No

Yes Standard script deliminators are guaranteed to be available on any Web server that supports PHP. Also the only method that is completely compliant with XML

Can you nest PHP script delimeters within HTML paragraph elements? Yes or No

Yes page 5 The paragraph element forces the output from the script delimeters to render on a separate line.


Ensembles d'études connexes

Quizlet Nursing Care of Children

View Set

The Handmaid's Tale Quizlet for Test

View Set

MRKTING EXAM 2, MKT EXMA 3 CH. 12 -16, MKT Exam 4 CH. 17 - 22

View Set

Jane Austen Mastery Test (All are right except 1st question)

View Set