PHP Questions Flashcards
What does (=) do?
Assigns a value
What does (==) do?
Checks if values are the same
What does (===) do?
Checks if values are the same and of same type
What does echo do?
Outputs what is passed to it
What does print do?
Outputs what is passed to it and acts as function for passing comples statements
What does printf do?
Used for formatting output
What does include do?
Includes a file each time it’s called
What does include_once do?
Will only include file when first called
What does require do?
Same as include but results in error if file not found
How are variables passed to functions?
By value unless it is passed with an ‘&’, which would make it by reference
What is the differance between crypt() and md5()?
crypt() is used for encrypting something that be decrypted later. md5() produces a hash, which cannot be decrypted
What are PHP Statics?
Elements that can be accessed from any context. Like calling a method from another class without needing to instantiate that class
What is POST?
An array of variable passed via http post method
What is GET?
Array of variable passed via http url parameters
What is SESSION?
Array of variables that can be preserved accross acccess of a site, usually stored in memory or database