Intro to PHP Flashcards Preview

Server Side Midterm > Intro to PHP > Flashcards

Flashcards in Intro to PHP Deck (16)
Loading flashcards...
1
Q

What was PHP created for?

A

It was creating for tracking visitors in 1994

2
Q

What did PHP originally stand for?

A

Personal Home Page

3
Q

What does PHP stand for now?

A

PHP Hypertext Preprocessor or Hypertext Preprocessor

4
Q

Is Javascript a client side or server side language?

A

It is usually client side

5
Q

What are the differences between a compiled language and an interpreted language?

A

An interpreted language requires an interpreter

Execute instructions directly, without compiling into
machine code
– Requires a interpreter executes the program directly
• translating each statement into a sequence of one or
more subroutines
– Already compiled into machine code

6
Q

Platforms that combine compiled and interpreted language are a trend: name a few

A

BASIC, C, Lisp, Pascal, and Python

7
Q

Why use PHP?

A

To build a dynamic webpage

Interactive UI

Be used with web frameworks or template
engines to develop interactive websites.

8
Q

What does PHP not do?

A

Like all other Server-side languages, PHP provides the
“business logic” behind what you are seeing

• Cannot handle client-side UI tasks:
– mouse-overs
– pop-up windows
– etc.

• Alternatively, PHP can send JavaScript to the web
browser
– send text via HTML to the web browser.
– Client-side languages generate final web page

9
Q

How could you hide the fact that php is being used?

A

Use a .html extension and place php in the document

10
Q

What do webpages combine which languages?

A

PHP code
• HTML
• JavaScript
• Some MySQL statements

It is laid out with CSS

11
Q

What is the most efficient way of using the php tag?

A

Start and end the document with php tags

Smallest possible fragments of php

Leave the rest of the document in html (faster)

12
Q

How do you write a comment in php?

A

// or /* */

13
Q

What is the difference between single quotes and double quotes?

A

Single quotes are a literal string

Double quotes will attempt to process it as a variable

14
Q

How do you escape tabs, new lines or carriage returns?

A

\t, \n, and \r

15
Q

How do you append a string?

A

With a period dot between items

16
Q

What do three

A

It signals a heredoc