PHP Online Question

What does PHP stand for? (A) Private Home Page (B) PHP: Hypertext Preprocessor (C) Personal Hypertext Processor

PHP server scripts are surrounded by delimiters, which? (A) <script>...</script> (B) <?php>...</?> (C) <?php...?> (D) <&>...</&>

How do you write "Hello World" in PHP (A) echo "Hello World"; (B) Document.Write("Hello World"); (C) "Hello World";

All variables in PHP start with which symbol? (A) ! (B) $ (C) &

What is the correct way to end a PHP statement? (A) . (B) ; (C) New line (D) < /php >

The PHP syntax is most similar to: (A) JavaScript (B) Perl and C (C) VBScript

How do you get information from a form that is submitted using the "get" method? (A) $_GET[]; (B) Request.Form; (C) Request.QueryString;

When using the POST method, variables are displayed in the URL: (A) True (B) False

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

Include files must have the file extension ".inc" (A) True (B) False

PHP Online Question

What is the correct way to include the file "time.inc" ? (A) <?php include "time.inc"; ?> (B) <?php include:"time.inc"; ?> (C) <?php include file="time.inc"; ?> (D) <!-- include file="time.inc" -->

What is the correct way to create a function in PHP? (A) new_function myFunction() (B) create myFunction() (C) function myFunction()

What is the correct way to open the file "time.txt" as readable? (A) fopen("time.txt","r"); (B) open("time.txt"); (C) fopen("time.txt","r+"); (D) open("time.txt","read");

PHP allows you to send emails directly from a script (A) False (B) True

Which superglobal variable holds information about headers, paths, and script locations? (A) $_SERVER (B) $GLOBALS (C) $_SESSION (D) $_GET

What is the correct way to add 1 to the $count variable? (A) ++count (B) $count =+1 (C) count++; (D) $count++;

What is a correct way to add a comment in PHP? (A) <comment>...</comment> (B) *\...\* (C) <!--...--> (D) /*...*/

PHP can be run on Microsoft Windows IIS(Internet Information Server): (A) True (B) False

The die() and exit() functions do the exact same thing. (A) True (B) False

Which one of these variables has an illegal name? (A) $my-Var (B) $my_Var (C) $myVar

PHP Online Question

How do you create a cookie in PHP? (A) makecookie() (B) createcookie (C) setcookie()

In PHP, the only way to output text is with echo. (A) True (B) False

How do you create an array in PHP? (A) $cars = "Volvo", "BMW", "Toyota"; (B) $cars = array("Volvo", "BMW", "Toyota"); (C) $cars = array["Volvo", "BMW", "Toyota"];

The if statement is used to execute some code only if a specified condition is true (A) True (B) False

Which operator is used to check if two values are equal and of same data type? (A) == (B) != (C) === (D) =