Lectures Flashcards
Consider an input such as alert (“Exploit!”);
What can go wrong?
Can break pages by executing the script and by interrupting HTML syntax
By default, some browsers keep track of the previous http request and some refuse to execute JS that matches the request. Some do not.
Is PHP dynamically typed?
YES LOL
What does a dynamically typed entail?
The variables do not self-identify simply by reading the left hand side of an assignment operation.
PHP variables have an internal type. PHP variables can be of the types:
Integer — Whole Numbers
Double — Real Numbers
String — Character Strings
Boolean — True/False
Array — Multi-valued data structures
Object — Class instances
NULL — Special value to indicate no assignment
Resource — References a connection to a system external to PHP internals
What are values submitted through HTML forms treated as? Which type?
Strings
What are values submitted through HTML forms treated as? Which type?
Strings
Can superglobal arrays be manipulated directly?
Yes, though it is generally good form to copy values out of the superglobals before manipuating them.
This is for practical and code maintenance reasons more than anything.