php cert quizzes Flashcards
What does PHP stand for?
A. PHP: Hypertext Preprocessor
B. Private Home Page
C. Personal Hypertext Processor
A. PHP: Hypertext Preprocessor
PHP server scripts are surrounded by delimiters, which?
A. …?>
B. …&>
C. …
D.
D.
How do you write “Hello World” in PHP
A. echo “Hello World”;
B. Document.Write(“Hello World”);
C. “Hello World”;
A. echo “Hello World”;
All variables in PHP start with which symbol?
A. !
B. $
C. &
B. $
What is the correct way to end a PHP statement?
A. ;
B. .
C.
D. New line
A. ;
The PHP syntax is most similar to:
A. Perl and C
B. JavaScript
C. VBScript
A. Perl and C
How do you get information from a form that is submitted using the “get” method?
A. $_GET[];
B. Request.QueryString;
C. Request.Form;
A. $_GET[];
When using the POST method, variables are displayed in the URL:
True or False
False
In PHP you can use both single quotes ( ‘ ‘ ) and double quotes ( “ “ ) for strings:
True or False
True
Include files must have the file extension “.inc”
True or False
False
What is the correct way to include the file “time.inc” ?
A.
B.
C.
D.
A.
What is the correct way to create a function in PHP?
A. function myFunction()
B. new_function myFunction()
C. create myFunction()
A. 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. open(“time.txt”,”read”);
D. fopen(“time.txt”,”r+”);
A. fopen(“time.txt”,”r”);
PHP allows you to send emails directly from a script
True or False
True
Which superglobal variable holds information about headers, paths, and script locations?
A. $GLOBALS
B. $_SESSION
C. $_GET
D. $_SERVER
D. $_SERVER