web Flashcards
What main protocol does the web use to communicate between computers?
HTTP
What main protocol does the web use to communicate between computers?
HTTP
What does HTTP stand for?
Hypertext Transfer Protocol
What is the purpose of a server?
To accept the HTTP request
What is the purpose of the client?
To send the HTTP request
When a domain name is entered in browser, where are IP retrieved?
The internet, usually a DNS server
What does PHP usually do?
execute SQL commands on the database
What tags in html are used to define php?
What tag defines javascript?
What is the purpose of ajax?
Make server/client communication faster
What did AJAX used to stand for?
Asynchronous JavaScript and XML
What is new about HTML5?
Markup, new API’s and applications
What is an example of markup?
,,,
What’s an example of a new API?
,,
What are the three most used web servers?
Apache, Nginx,Microsoft-IIS
What are some examples of development servers?
LAMP,WAMP,MAMP
Give two examples of alternatives to XAMP
EasyPHP, WAMPServer
Give an example of an FTP program that can send files to your server
Add to dictionary
What eclipse version is good for web development?
Eclipse PDT
Give a line of php that prints a statement
echo “print statement”;
How do you comment in php?
double slashes
What must precede a variable name in php?
$
Create a new tag using php
echo “<br></br>”;
How are arrays initialized in php?
$team = array(‘bilk’,’jane’);
Are java and php operators relatively the same?
Yes
What is the syntax for concatenation of a string
echo “you have”.$msg;
What is the difference between double and single quotes?
In double quotes $name are evaluated as variables, while single quotes the exact data is preserved.
How can the escape character ( \ ) be used?
‘My spelling's shitty”
What does HTTP stand for?
Hypertext Transfer Protocol
What is the purpose of a server?
To accept the HTTP request
Does a constant need a $?
No
When a domain name is entered in browser, where are IP retrieved?
The internet, usually a DNS server
What does PHP usually do?
execute SQL commands on the database
What tags in html are used to define php?
What tag defines javascript?
What is the purpose of ajax?
Make server/client communication faster
What did AJAX used to stand for?
Asynchronous JavaScript and XML
What is new about HTML5?
Markup, new API’s and applications
What is an example of markup?
,,,
What’s an example of a new API?
,,
What are the three most used web servers?
Apache, Nginx,Microsoft-IIS
What are some examples of development servers?
LAMP,WAMP,MAMP
Give two examples of alternatives to XAMP
EasyPHP, WAMPServer
Give an example of an FTP program that can send files to your server
Add to dictionary
What eclipse version is good for web development?
Eclipse PDT
Give a line of php that prints a statement
echo “print statement”;
How do you comment in php?
double slashes
What must precede a variable name in php?
$
Create a new tag using php
echo “<br></br>”;
How are arrays initialized in php?
$team = array(‘bilk’,’jane’);
Are java and php operators relatively the same?
Yes
What is the syntax for concatenation of a string
echo “you have”.$msg;
What is the difference between double and single quotes?
In double quotes $name are evaluated as variables, while single quotes the exact data is preserved.
How can the escape character ( \ ) be used?
‘My spelling's shitty”
What is used to preserve whitespace in a string?
heredoc - «
What’s the significance of calling php “loosely typed”?
Variables don’t have to be declared before use.
How is a constant defined?
define(“name”, value);
Does a constant need a $?
No
What does the LINE constant hold?
the current line number in the file
What does the FILE constant hold?
full path and filename
What does DIR hold?
The directory of the file
What does the FUNCTION hold?
The current function
What does thee CLASS hold?
The class name
What does the METHOD hold?
The class method name
What does the NAMESPACE hold?
The current namespace
What is the difference between the print and echo methods?
the print method has a return value
What is the syntax to define a function?
function name($arg) {}
What title do variables get if they occur outside of a function?
global
Do you have to add a static title to static variables?
Yes
What are some examples of superglobal variables?
$GLOVALS, $_SERVER, $_GET, $_POST,
$_FILES, $_COOKIE, $_SESSION, $_REQUEST, $ENV
How do you sanitize superglobal variables?
htmlentities
What is the triple equal sign?
The identity operator
What does the identity operator do?
Prevents the conversion between types
What is the alternative of conditional statements?
The ? symbol
What is the syntax for the alternative condition statement?
CONDITION ? IFTRUE : IFFALSE
Are loops in php generally the same as java and similar lower level languages?
Yes
are casting/boxing/unboxing similar in regard to syntax as java?
Yes
For traversal through arrays, what loop is best?
for each as loop
When assigning an element with a specific key what is the syntax
key =.> value
What does the list function do?
assigns the array elements to the list elements
What html tag is used to maintain white space?
<pre></pre>
What php functions are most used?
count, is_array, sort, rsort, reset, end
What does the php function shuffle do?
shuffles an array
What does the php function explode do?
Puts the tokens of a string into an array
What are common array/variable conversion functions?
extract and compact