Friday, February 17, 2023

Web Application Development 1

 IT6314  Web Application Development 1


PHP script tags ends with ?>;

False

PHP project originally started in 1995 by RasmusLerdorf. (1994)

False

Facebook, wordpress uses php as script language.

True

PHP is proprietary software.

True

The default file extension for PHP files is ".php".

True

PHP only runs in Apache web server.

False

Working locally you an access php script by using http://localhosts/filename.php

False

Originally PHP is known as PHP: Hypertext Preprocessor (Personal Home Page)

False

Using XAMPP server you can use SQL Server database.

False

Version 4 of php supports global variables $Get etc. (v4.1)

False

Andi Gutmans was the inventor of PHP.

False

PHP 3 was released in 1998.

True

Originally PHP is known as "Personal Home Pages"

False

PHP is one of the most widely used and recognizable web technology use on the internet.

True

PHP runs on various platforms operating system such as apache and IIS

False

Identify if the statement if True or False. Write True if statement is true otherwise False php.org is the official php resource.

False

PHP in now known as "PHP: Hypertexts Preprocessor"

False

Using the $_POST is allowed us to collect data from the htm file and display to the php script

True

It uses spec cols and rows attributes, or even better; through CSS' height and width properties.

textarea

Function that is used to check whether a variable is set or not.

isset()

It refers to styles for your documents, including the design, layout and variations in display for different devices and screen sizes.

CSS

represents a control that presents a menu of options.

select

In PHP you can use both single quotes ( ' ' ) and double quotes ( " " ) for strings

True

Option buttons are also called Selection button

False

PHP can be run on Microsoft Windows IIS(Internet Information Server):

True

A line of php code must end with a ?

Semicolon ( ; )

PHP variables start with what symbol ?

A $ symbol

Element represents a control that presents a menu of options.

HTML select

Symbol used to combine 2 sting values to create one string.

.

Is allowed us to collect data from the htm file and display to the php script.

$_POST

One of the main points of interaction between a user and a web site or application. They allow users to send data to the web site.

HTML forms

Can hold an unlimited number of characters, and the text renders in a fixed-width font.

Textarea

A variable declared within a function.

local

Other term use for Option buttons?

Radio buttons

Area that can be specified by the cols and rows attributes, or even better; through CSS' height and width properties

textarea

Symbol use to append data or string

.

A way on how to print / display text on the screen.

echo

Multiple Choice. Select the best answer How do you write "Hello World" in PHP

echo "Hello World";

Multiple Choice. Select the best answer How do you start the standard form PHP scripting block?

<?php … ?>

PHP server scripts are surrounded by delimiters, which?

<?php...?>

How many single line commenting types are there?

2

Which is the incorrect way to start a single line PHP comment?

/* .. */

What does PHP stand for?

PHP: Hypertext Preprocessor

In PHP, the only way to output text is with echo.

False

Which one of these variables has an illegal name?

$my-VarV

All variables in PHP start with which symbol?

$

Syntax is a set of rules that must be followed to write properly structured code?

True

What does a semicolon signify at the end of a instruction or statement?

the end of a PHP statement or instruction

All text in a multiple line comment block is ignored?

True

The PHP syntax is most similar to:

Perl and C

How do you start the shorthand form PHP scripting block?

<? … ?>

What is the correct way to end a PHP statement?

;

When a variable is declared, it can only be used 1 time in your PHP source file?

False

PHP variables need to be declared before adding a value to it?

False

If a source file contains PHP code, what extension should be used?

php

When using the POST method, variables are displayed in the URL:

False

Whitespace is not ignored in PHP?

False

Which is the correct way to write a multiple line PHP comment?

/* .. *

Which of the following is the incorrect way to declare a PHP variable?

$a_Number = 9

For maximum compatibility, you should use the shorthand form to create PHP scripts?

False

PHP can be run on Microsoft Windows IIS(Internet Information Server):

True

Look at the following code and determine what will be displayed in the browser:

<?php

echo "Hello World 1";

// echo "Hello World 2";

?>

Hello World 1

What data type will PHP automatically convert the following variable to:? $aVariable = 99;

integer (a number variable)

Which of the following is the incorrect way to declare a PHP variable?

$a Variable;

All variables in PHP start with a $(dollar) sign?

True

What data type will PHP automatically convert the following variable to: $aVariable = "Robert";

string (a text variable)

All text to the right of a single line comment is not ignored?

False

The following comparison condition would return TRUE or FALSE:(3 <> 6)

True

The following example $x -= $y; is the same as?

$x = $x – $y;

The logical operator || stands for?

OR

The following condition will return TRUE or FALSE: !(3 >= 3 || 8 < 1)

False

The following condition will return TRUE or FALSE ( (2 >= 2 && 8 < 1) || (11 == 33 || 5 > 3) )

True

The following condition will return TRUE or FALSE:(7 >= 7 && 9 < 2)

False

The logical operator && stands for?

AND

The logical operator ! stands for?

NOT

If the variable $x = 11; , what will $x equal if it is incremented, that is, if I write $x++; what value will $x contain after it has been incremented?

12

The following condition will return TRUE or FALSE: (7 >= 7 && 9 < 2)

False

True or False - The operator AND, when used to link two concept terms (e.g. children and violence) will retrieve only those records that contain both concept terms

True

The concatenation operator in PHP?

.

Tag is used to group block-elements to format them with CSS.

div

Identification. Write your answer on the space provided. +, -, *, /, %, are all examples of what category of operators

arithmetic operators

True or False - The following search statement will exclude any records that contain the term "poodle." (dogs OR canines) NOT cats.

False

If I wanted to concatenate a word to a string variable I would use which symbol?

.

True or False - Using the operator AND to combine concept terms is a good way to increase the number of records retrieved in a search.

False

Symbol use as identical

===

True or False - The operator OR, when used to link two or concept terms will retrieve fewer records because both terms need not be present in each article.

False

Which operator will check if two variables are the same?

==

 

what will be the output of the following PHP code?




abcd

 

what will be the output of the following PHP code?



No output

 

what will be the output of the following PHP code?



Error

 

what will be the output of the following PHP code?



Error

 

what will be the output of the following PHP code?




error

 

what will be the output of the following PHP code?



######### [ 9 hash]

 

what will be the output of the following PHP code?



Infinite loop

 

what will be the output of the following PHP code?



error

 

what will be the output of the following PHP code?



error

 

what will be the output of the following PHP code?



No output

What will be the output of the following PHP code ?

<?php

for($x=0;$x<=10;$x++)

{

echo"The number is: $x<br>";

}

?>

The number is: 0

The number is: 1

The number is: 2

The number is: 3

The number is: 4

The number is: 5

The number is: 6

The number is: 7

The number is: 8

The number is: 9

The number is: 10

What will be the output of the following PHP code ?

<?php

for($i++;$i==1;$i=2)

print"In for loop ";

print"After loop\n";

?>



In for loopAfter for loop

<?php

for($x=0;$x<=10;++$x)

{

print++$x;

}

?>



123456789101112

What will be the output of the following PHP code ?

<?php

for($x=-1;$x<10;--$x)

{

print$x;

}

?>




infinite loop

What will be the output of the following PHP code ?

<?php

$colors=array("red","green","blue","yellow");

foreach($colors as $value)

{

echo "$value<br>";

}


red

green

blue

yellow

What will be the output of the following PHP code ?

<?php

for(1;$i==1;$i=2)

print"In for loop ";

print"After loop\n";

?>



After for loop

What will be the output of the following PHP code ?

<?php

$x;

for($x=-3;$x<-5;++$x)

{

print++$x;

}

?>




no output

What will be the output of the following PHP code ?

<?php

for($x=1;$x<10;++$x)

{

print"*\t";

}

?>




*********

What will be the output of the following PHP code ?

< ?php

$i = 0;

for ($i)

{

print$i;

}

? >




error

What will be the output of the following PHP code ?

<?php

for($i==2;++$i==$i;++$i)

print"In for loop ";

print"After loop\n";

?>



In for loop In for loop In for loop In for loop......infinitely

 

what will be the output of the following PHP code?


Chr(65)

 

what will be the output of the following PHP code?



error

What will happen in this function call?

what will be the output of the following PHP code?





Call by value

 

what will be the output of the following PHP code?


Array ([3] => blue [4] => blue [5] => blue [6] => blue)

Array ([0] => red )

 

what will be the output of the following PHP code?


I like Volvo, BMW and Toyota

 

what will be the output of the following PHP code?



Cos(0)

 

what will be the output of the following PHP code?


Array ([0] => red [1] => green [2] => blue [3] => yellow )

 

what will be the output of the following PHP code?




Chr(49)

 

what will be the output of the following PHP code?



AMA University

Which one of the following is the right way of defining a function in PHP?

functionfumctionName(parameters) { function body }

PHP's numerically indexed array begin with position __.

0

What is the output of the following?

echo substr("abcdef", -2), ', '; echo substr("abcdef", 4), ', '; echo substr("abcdef", -3, -1), ', '; echo substr("abcdef", 4, -2), ', '; echo substr("abcdef", 2, -1)

Ef, ef, de, , cde

There are three different kind of arrays:

Numeric array, Associative array, Multidimensional array

Assume you would like to sort an array in ascending order by value while preserving key associations. Which of the following PHP sorting functions would you use?

asort()

What is the function of the ucfirst and lcfirst functions?

To make the string's first character uppercase or lowercase, respectively

What will the following script output?

78

Array values are keyed by ______ values (called indexed arrays) or using ______ values (called associative arrays). Of course, these key methods can be combined as well.

Integer, String

What functions count elements in an array?

count

What is the output of the following? echo strcmp('first', 'second'), ", "; echo strcmp('44', '054'), ", "; echo strcmp('0x80', 'a'), ", "; echo strcmp('a', 'A');

-1, 1, -1, 1

What is the output of the following code snippet?

$str = 'asdfghyo off on off'; $replace_pairs = array('a' => 'q', 's' => 'w', 'd' => 'e', 'f' => 'r', 'y' => 'z', 'o' => 'i', 'off' => 'on', 'on' => 'off'); echo strtr($str, $replace_pairs);

Qwerghzi on off on

Which statement will evaluate and include a file into the location where it is called.

include statement

 

what will be the output of the following PHP code?



6

The following condition will return TRUE or FALSE: (4 >= 4 && 8 < 1)

False

The following condition will return TRUE or FALSE:!(4 >= 4 || 8 < 1)

False

 

what will be the output of the following PHP code?


Welcome to the USA

 

what will be the output of the following PHP code?




1: 2, 2: 20, 3: 16

 

what will be the output of the following PHP code?



Hello World

 

what will be the output of the following PHP code?




infinitive

The PHP If Else Statement can execute the code within the if and else segments at the same time?

False

If the variable $x = 10; , what will $x equal if it is incremented, that is, if I write $x++; what value will $x contain after it has been incremented?

11

The logical operator && stands for?

AND

 

what will be the output of the following PHP code?


Syntax Error

In which positions PHP's indexed array begin?

0

The PHP If Statement will only execute the code within it's curly braces if the if condition is FALSE?

False

The logical operator || stands for?

OR

The logical operator ! stands for?

NOT

What is the output of the following code?

$a=1;

++$a;

$a*=$a;

echo $a- -;

4

 

what will be the output of the following PHP code?


Hello world

 

what will be the output of the following PHP code?




2

 

what will be the output of the following PHP code?


Nothing will be displayed

The following condition will return TRUE or FALSE:(4 >= 4 || 8 < 1)

True

The following condition will return TRUE or FALSE ( (4 >= 4 && 8 < 1) || (44 == 33 || 5 > 3) )

True

Which is identified as a special variable, which can store multiple values in one single variable?

Array

The following are examples of =, +=, *=, /=, .= _______ Operators

Assignment

The following comparison condition would return TRUE or FALSE:(4 <> 7)

True

 

what will be the output of the following PHP code?

Hello YouTube

The following are examples of >, <=, >=, ==________ Operators

Comparison

The following example $a -= $b; is the same as?

$a = $a – $b;

 

what will be the output of the following PHP code?


Hello World

The following are examples of =, !=, === ______ Operators

Equality

The ________ clause is used to list the attributes desired in the result of a query.

Select

The ______ clause allows us to select only those rows in the result relation of the ____ clause that satisfy a specified predicate.

Where, from

Select * from employee where salary>10000 and dept_id=101; Which of the following fields are displayed as output?

All the field of employee relation

The query given below will not give an error. Which one of the following has to be replaced to get the desired output? Select ID, name, dept name, sal * 1.1 where instructor;

WHERE

Select name, course_id from instructor, teaches where instructor_ID= teaches_ID; This Query can be replaced by which one of the following ?

Select name, course_id from instructor natural join teaches;

Which of the following employee_id will be displayed?

1018

Insert into employee _____ (1002,Jeiven,2000); In the given query which of the keyword has to be inserted ?

Values

Which of the following statements contains an error?

Select empid where empid = 1009 and lastname = ‘JOHANN;

Which of the following displays the unique values of the column. Select ________ dept_name from instructor;

Distinct

MySQL runs on which operating systems?

Unix, Linux, Windows and others

Which of the following can add a row to a table?

Insert

Which function used to get the current time in mysql?

NOW()

MySQL is

A Relational Database Management System

To use MySQL on your computer, you'll need?

Some sort of client program to access the databases

To remove duplicate rows from the result set of a SELECT use the following keyword:

DISTINCT

A NULL value is treated as a blank or 0.

False

In a LIKE clause, you can could ask for any value ending in "qpt" by writing

LIKE %qpt

Which SQL statement is used to insert a new data in a database?

INSERT INTO

The result of a SELECT statement can contain duplicate rows.

True

The "I" in MySQLi stands for

improved

Function that select database.

mysql_select_db();

This function allows you to close the current connection.

close();

Which one of the following databases has PHP supported almost since the beginning?

MYSQL

this function allows you to connect to mysql database

mysql_connect(),

Which one of the following statements should be used to include a file?

include 'filename';

This command sends active query to the database

mysql_query()

Which one of the following methods is responsible for sending the query to the database?

query()

Which one of the following method is used to retrieve the number of rows affected by an INSERT, UPDATE, or DELETE query

affected_rows()

Which one of the following statements is used to create a table?

CREATE TABLE table_name (column_namecolumn_type);

Assuming the table and fields below exists, what is wrong with the following mysql query example: mysql_query("INSERT INTO contacts (firstName, lastName, phoneNumber) VALUES ('Robert', 'Smith')");

There are more fields than values

If a PHP script opens a MySQL connection, the script will automatically close the connection after the script has finished executing?

True

Assuming the table and fields below exists, what is wrong with the following mysql query example: mysql_query("INSERT INTO contacts (firstName, lastName) VALUES ('Robert', 'Smith', '123-983-2929')");

There are more values than fields

The "mysql_close()" function allows you to close a MySQL connection?

True

The INSERT INTO statement is not used to add new records to a database table?

False

Assuming the table and fields below exists, what is wrong with the following mysql query example: mysql_query("INSERT INTO contacts (firstName, lastName, phoneNumber) VALUES ('Robert', 'Smith', '123-983-2929')");

Nothing, everything is fine

The "mysql_connect()" function opens a MySQL connection?

True

The "or die()" part of a MySQL command will execute if the connection fails?

True

The "mysql_error()" function returns the error description for a MYSQL operation?

True

returns the numbers of rows in a columns.

count()

Function is used to convert a human readable string to a Unix time.

strtotime()

Joining values together (by appending them to each other) to form a single long value.

concatenate

Converts text to uppercase

Upper()

Function trims all spaces from the right of a value

RTRIM()

 

what will be the output of the following PHP code?


Today is April 16, 2017

 

what will be the output of the following PHP code?

30

Which one of the following function is useful for producing a timestamp based on a given date and time.

mktime()

The date() function returns ___ representation of the current date and/or time.

String

Returns the highest value

MAX()

It's a function returns the Unix timestamp for a date.

mktime()

It's a time manipulation function that returns the current date.

CurDate()

It's a text function that returns convert string to lowercase

Lower()

It's a function that returns the lowest value in a column.

Min()

Is the SQL statement correct or not. SELECT vend_name, prod_name, prod_price, vendors.vend_id, products.vend_id FROM vendors INNER JOINS products ON vendors.vend_id = products.vend_id;

No

One of the parameters to represent the day of the month

d

This are functions that operate on a set of rows to calculate and return a single value.

Aggregate functions

The SQL WHERE clause:

limits the row data are returned.

The wildcard in a WHERE clause is useful when?

An exact match is not possible in a SELECT statement.

What does SQL stand for?

Structured Query Language

Which one of the following sorts rows in SQL?

ORDER BY

With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" is "Peter"?

SELECT * FROM Persons WHERE FirstName = 'Peter'

MySQL was invented in the year of

1994

The SQL keyword(s) ________ is used with wildcards.

LIKE only

You can add a row using SQL in a database with which of the following?

INSERT

In an SQL SELECT statement querying a single table, the asterisk (*) means that:

all columns of the table are to be returned.

The SQL keyword BETWEEN is used:

for ranges.

Which of the following is the correct order of keywords for SQL SELECT statements?

SELECT, FROM, WHERE

Which of the following statement is not true about MySQL DROP command?

it can be used to delete only data but not structure of a table

The HAVING clause does which of the following?

Acts like a WHERE clause but is used for groups rather than rows.

Which of the following are the five built-in functions provided by SQL?

COUNT, SUM, AVG, MAX, MIN

When three or more AND and OR conditions are combined, it is easier to use the SQL keyword(s):

Both IN and NOT IN.

Which SQL statement is used to insert new data in a database?

INSERT INTO

Find the SQL statement below that is equal to the following: SELECT NAME FROM CUSTOMER WHERE STATE = 'VA';

SELECT NAME FROM CUSTOMER WHERE STATE IN ('VA');

The command to remove rows from a table 'CUSTOMER' is:

DELETE FROM CUSTOMER WHERE ...

To remove duplicate rows from the results of an SQL SELECT statement, the ________ qualifier specified must be included

DISTINCT

With SQL, how do you select a column named "FirstName" from a table named "Persons"?

SELECT FirstName FROM Persons

Which of the following is the original purpose of SQL?

All of the above.

What does the following MySQL command do?

 SELECT * FROM author WHERE auth_name LIKE 'W%';

Return those rows from the table author in which the name of the author starts with the character 'W

Which SQL statement is used to delete data from a database?

DELETE

The SQL statement that queries or reads data from a table is ________ .

SELECT

Which one of the following denotes the difference between SELECT and USE command?

SELECT checks which database is currently selected, USE selects a database

A subquery in an SQL SELECT statement

has a distinct form that cannot be duplicated by a join.

MYSQL can be used to:

All of the above can be done by MYSQL.

Which one of the following denotes the default mysql date format?

YYYY-MM-DD

MySQL COUNT() function returns

a count of number of non-NULL values of a given expression

To sort the results of a query use:

ORDER BY.

Consider the following snippet code var string1 = "123"; var intvalue = 123; alert( string1 + intvalue );

123123

XMLHttpRequest object function that cancel request.

Abort()

JavaScript Code can be called by using

Function/Method

Consider the following code snippet : var grand_Total=eval("10*10+5");

105 as an integer value

AJAX is a programming language

It refers to a client-side script that communicates to and from a server/database without the need for a postback or a complete page refresh

Ajax

Status 200 means

Object is used to exchange data with a server behind the scenes.

XMLHttpRequest

Server command that calls itself

$_SERVER['PHP_SELF']

Security is not an issue with JavaScript

False

Original developer of JavaScript?

Brendan Eich

Its a client-side script that communicates to and from a server/database without the need for a postback or a complete page refresh

AJAX

An object-oriented computer programming language commonly used to create interactive effects within web browsers

JavaScript

True or False. JavaScript can be inserted into any web page regardless of the file extension.

True

The keystone of AJAX

XMLHttpRequest

Original Name of JavaScript

LiveScript

Returns the status-number of a request if "OK"

200

Returns header information

getAllResponseHeaders()

Ajax Stands for

Asynchronous JavaScript And XML.

 

what will be the output of the following PHP code?



10

Originally PHP is known as PHP: Hypertext Preprocessor (Personal Home Page)

False

Facebook, wordpress uses php as script language.

True

The default file extension for PHP files is ".php".

True

Andi Gutmans was the inventor of PHP.

False

The default file extension for PHP files is ".php".

True

PHP in now known as "PHP: Hypertexts Preprocessor"

False

Using XAMPP server you can use SQL Server database.

False

PHP version that enabled the filter extension by default Native JSON default

php 5.2

Originally PHP is known as "Personal Home Pages"

True

PHP script tags ends with ?>;

False

PHP is proprietary software.

True

Year that PHP was officially called Personal Home Page Tools.

1995

Version 4 of php supports global variables $Get etc. (v4.1)

False

What functionality was added to PHP 5.1 as interface for accessing databases?

pdo

Year that PHP 3 was released

1998

PHP version that uses void return type, class constant visibility modifiers, null types

7.1

PHP development began in 1995.

True

php.org is the official php resource.

false

What year did PHP began its development

1994

In PHP you can use both single quotes ( ' ' ) and double quotes ( " " ) for strings

True

Is allowed us to collect data from the htm file and display to the php script.

$_POST

A variable declared within a function

local

PHP variables starts with what symbol.

$

PHP can be run on Microsoft Windows IIS(Internet Information Server):

True

Option buttons are also called Selection button

False

element represents a control that presents a menu of options.

HTML select

Script use in every php code.

<?php?>

PHP variables start with what symbol ?

A $ symbol

Symbol use to append data or string

.

It refers to styles for your documents, including the design, layout and variations in display for different devices and screen sizes.

CSS

It uses spec cols and rows attributes, or even better; through CSS' height and width properties.

textarea

Using the $_POST is allowed us to collect data from the htm file and display to the php script

True

Function that is used to check whether a variable is set or not.

isset()

Define styles for your documents, including the design, layout and variations in display for different devices and screen sizes.

CSS

Element can be placed onto a web page in a pre-checked fashion by setting the checked attribute

Checkbox

a tag that defines a multi-line text input control

<textarea>

represents a control that presents a menu of options.

select

It uses spec cols and rows attributes, or even better; through CSS' height and width properties.

text area

One of the main points of interaction between a user and a web site or application. They allow users to send data to the web site.

HTML forms

Storage of data in PHP

variables

Is a line that is not read/executed as part of the program

comment

Can hold an unlimited number of characters, and the text renders in a fixed-width font

text area

Two ways on how to print / display text on the screen

echo ; print

Symbol used to combine 2 sting values to create one string.

.

function is used to display structured information (type and value) about one or more variables.

var_dump()

A line of php code must end with a ?

Semicolon ( ; )

Other term use for Option buttons?

Radio Buttons

A variable declared outside a function

Global

represents a control that presents a menu of options.

select

Which of the following is the incorrect way to declare a PHP variable?

$a_Number = 9

How do you write "Hello World" in PHP

echo "Hello World";

The PHP syntax is most similar to:

Perl and C

How do you start the shorthand form PHP scripting block?

<? … ?>

Syntax is a set of rules that must be followed to write properly structured code?

True

All variables in PHP start with which symbol?

$

If a source file contains PHP code, what extension should be used?

.php

In PHP you can use both single quotes ( ' ' ) and double quotes ( " " ) for strings:

< comment >...< / comment > (wrong)

PHP can be run on Microsoft Windows IIS(Internet Information Server):

True

What does a semicolon signify at the end of a instruction or statement?

the end of a PHP statement or instruction

All text to the right of a single line comment is not ignored?

False

Writing comments is considered a bad programming practice?

False

Which is the correct way to write a multiple line PHP comment?

/* .. */

Whitespace is not ignored in PHP?

False

Which is the incorrect way to start a single line PHP comment?

/* .. */

What data type will PHP automatically convert the following variable to:

integer (a number variable)

Which one of these variables has an illegal name?

$my-Var

The echo command is a means of outputting text to the web browser?

True

PHP variables are case-sensitive?

True

What is the correct way to end a PHP statement?

;

PHP server scripts are surrounded by delimiters, which?

<?php...?>

All variables in PHP start with a $(dollar) sign?

True

How do you start the standard form PHP scripting block?

<?php … ?>

$aVariable = "Robert";

string (a text variable)

How many single line commenting types are there?

2

In PHP, the only way to output text is with echo.

False

All text in a multiple line comment block is ignored?

True

When a variable is declared, it can only be used 1 time in your PHP source file?

False

For maximum compatibility, you should use the shorthand form to create PHP scripts?

False

PHP variables are case-sensitive?

True

Which is the correct way to write a multiple line PHP comment?

/* .. */

PHP can be run on Microsoft Windows IIS(Internet Information Server):

True

When using the POST method, variables are displayed in the URL:

False

Syntax is a set of rules that must be followed to write properly structured code?

True

The echo command is a means of outputting text to the web browser?

True

If a source file contains PHP code, what extension should be used?

.php

All variables in PHP start with a $(dollar) sign?

True

Look at the following code and determine what will be displayed in the browser:

<?php

echo "Hello World 1";

// echo "Hello World 2"; ?>

Hello World 1

How do you write "Hello World" in PHP

echo "Hello World";

How many single line commenting types are there?

2

$aVariable = "Robert";

string (a text variable)

PHP variables need to be declared before adding a value to it?

False

What is the correct way to end a PHP statement?

;

What does a semicolon signify at the end of a instruction or statement?

the end of a PHP statement or instruction

Writing comments is considered a bad programming practice?

False

The PHP syntax is most similar to:

Perl and C

Which of the following is the incorrect way to declare a PHP variable?

$a Variable; Correct Answer

In PHP, the only way to output text is with echo.

False

All variables in PHP start with which symbol?

$

What does PHP stand for?

PHP: Hypertext Preprocessor

How do you start the standard form PHP scripting block?

<?php … ?>

$aVariable = 99;

integer (a number variable)

Multiple Choice. Select the best answer

 

Which one of these variables has an illegal name?

$my-Var

All text in a multiple line comment block is ignored?

True

When a variable is declared, it can only be used 1 time in your PHP source file?

False

Which of the following is the incorrect way to declare a PHP variable?

$a_Number = 9

PHP server scripts are surrounded by delimiters, which?

<?php...?>


No comments:

Post a Comment