PHP - Chapter 1 - Vocabulary

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Which of the following refers to the first element in an indexed array named $Employees[]? a. $Employees[0] b. $Employees[1] c. $Employees[first] d. $Employees[a]

$Employees[0]

Which is the correct syntax for declaring a variable and assigning it a string? a. $MyVariable = "Hello"; b. $MyVariable = "Hello" c. "Hello" = $MyVariable; d. $MyVariable = Hello;

$MyVariable = "Hello";

Which of the following is a valid variable name? a. SalesOrder b. salesOrder c. $SalesOrder d. $1SalesOrder

$SalesOrder

Block comments start with /* and end with _____

*/

Comments in PHP can start with ______ or _______

// and #

4 types of tags

Default syntax <?php ?> Short open Tags <? ?> HTML Script Tags <script> </script> ASP Style Tags <% %>

The last element when defining an array(), should be followed by a comma. True or False

False

You are not required to initialize a variable when you first declare it. True or False?

False

________ or composite data types, which contain multiple values or complex types of information

Reference

Array elements are separated by commas. True or False

True

What do you use to separate multiple arguments that are passed to a function? a. a period (.) b. a comma (,) c. a forward slash (/) d. a backwards slash (\)

a comma (,)

Block comments begin with /* and end with _____. a. */ b. /* c. // d. **

a. */

Which arithmetic operators can be used as both prefix and postfix operators? (Choose all that apply.) a. ++ b. -- c. + d. -

a. ++ b. --

What is the default extension that most Web servers use to process PHP scripts? a. .php b. .html c. .xhtml d. .ini

a. .php

A loosely typed programming language _____. a. does not require data types of variables to be declared b. requires data types of variables to be declared c. does not have different data types d. does not have variables

a. does not require data types of variables to be declared

Which of the following values can be assigned to a Boolean variable? (Choose all that apply.) a. true b. false c. 1 d. yes

a. true b. false

How many decimal places does an integer store? a. zero b. one c. two d. as many as necessary

a. zero

What value is assigned to the $ReturnValue variable in the statement $ReturnValue = !$x;, assuming that $x has a value of true? a. true b. false c. null d. undefined

b. false

The order of priority in which operations in an expression are evaluated is known as _____. a. prerogative precedence b. operator precedence c. expression evaluation d. priority evaluation

b. operator precedence

You create line comments in PHP code by adding to a line you want to use as a comment. (Choose all that apply.) a. || b. ** c. # d. //

c. # d. //

What is the value of the expression 4 * (2 + 3)? a. 11 b. -11 c. 20 d. 14

c. 20

The And operator (&&) operator returns true if _____. a. the left operand returns a value of true b. the right operand returns a value of true c. the left operand and right operand both return a value of true d. the left operand and right operand both return a value of false

c. the left operand and right operand both return a value of true

Unlike XHTML and JavaScript, programming language constructs, functions and keywords in PHP are mostly _______.

case insensitive

Variables are ______ .

case sensitive

What character or characters are used as delimiters to separate multiple arguments (parameters) in a function declaration or function call?

comma

The _______ function is used to determine the number of elements in an array.

count()

The modulus operator (%) _____. a. converts an operand to base 16 (hexadecimal) format b. returns the absolute value of an operand c. calculates the percentage of one operand compared to another d. divides two operands and returns the remainder

d. divides two operands and returns the remainder

Use the _______ function to create a constant

define()

Examples of language constructs.

echo & print

The Web server sends the file to the scripting engine for processing. (javascript and php)

embedded languages

Data types that can be assigned only a single value are called _______.

primitive types

Built-in feature of a programming language

programming language construct

What value is assigned to the $ReturnValue variable in the statement $ReturnValue = 100!= 200;? a. true b. false c. 100 d. 200

true

A ________ requires a single operand either before or after the operator. For example, $count++.

unary operator

You can include _____ code blocks of PHP script sections as you want within a document. However, when you include multiple script sections in a document, you must include a separate code declaration block for each section.

unlimited

By convention, constant names use all _______ letters.

uppercase

Array elements start with an index number of ______.

zero

By default, indexes begin with the number_______ .

zero (0)


Set pelajaran terkait

FRIDAY (1/31) QUIZLET ONLY: Insight learning, cognitive map & latent learning

View Set

6 ABC-er og leseopplæringsmetoder

View Set

Sonidos en Contexto 24 [ɾ] [r] [h͡r] [r̥] [ɹ̝] [ɹ̝̊]

View Set

PN-NCLEX 6 Edition, Respiratory Pharmacology

View Set

Chapter 32 - Care of Critically Ill Patients with Respiratory Problems

View Set