PHP Study Guide

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

All variables in PHP start with which symbol?

$

How do you get information from a form that is submitted using the "get" method?

$_GET[];

Which superglobal variable holds information about headers, paths, and script locations?

$_SERVER

How do you create an array in PHP?

$cars = array("Volvo", "BMW", "Toyota");

What is the correct way to add 1 to the $count variable?

$count++;

Which one of these variables has an illegal name?

$my-Var

What is a correct way to add a comment in PHP?

/*...*/

What is the correct way to end a PHP statement?

;

What is the correct way to include the file "time.inc" ?

<?php require("time.inc"); ?>

PHP server scripts are surrounded by delimiters, which?

<?php...?>

Which operator is used to check if two values are equal and of same data type?

===

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

False

Include files must have the file extension ".inc"

False

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

False

What does PHP stand for?

PHP: Hypertext Preprocessor

The PHP syntax is most similar to:

Perl and C

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

True

PHP allows you to send emails directly from a script

True

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

True

The die() and exit() functions do the exact same thing.

True

The if statement is used to execute some code only if a specified condition is true

True

The setcookie() function must appear BEFORE the <html> tag

True

How do you write "Hello World" in PHP

echo "Hello World";

What is the correct way to open the file "time.txt" as readable?

fopen("time.txt","r");

What is the correct way to create a function in PHP?

function myFunction()


Ensembles d'études connexes

World Religions: Unit 4 Islam Terms

View Set

Intro to corrections chapter 1 and 2

View Set

Chapter 3 - States of Matter Test Prep

View Set

Chapter 02: The Environment and Corporate Culture

View Set