Week 7 - PHP Part 1 Flashcards
Apache
A type of web server software, different to MySQL which is a database.
CMS
Content Management System
Allows for users to create their own website without having to write too much code themselves.
What is PHP used for?
It’s used to make websites more interactive as it has access to a number of databases.
Eg; MySQL, Apache etc.
What’s the difference between client and server-side with PHP?
Client-side is used for displaying information, and submitting basic forms. Only HTML is seen on the client-side, no PHP.
Server-side is responsible for calculations and data storage.
What’s the difference between a loosely and strongly typed programming language?
Strongly typed requires you to determine what the data type is, like in Ruby or C.
Data types can’t be changed after the declaration.
Loosely typed is where you don’t have to declare, however data types can be changed after the declaration.
What are numerics?
Floats and integers.
What are the 4 ways to display variables?
- Listing concatenation ( , )
- Concatenation ( . )
- Embedded into the quotes of echo.
- Using escape characters " … "
Resource Data Type
A special variable which holds a reference to an external resource like a database (MySQL) or accessing XML files.
Reference & Composite Data Types
Special data types which can contain multiple values or complex types of information.
Examples of reference data types include arrays & objects.
count()
An inbuilt function into PHP used for checking the number of elements in an array.
print r
Prints out all elements and their index.
Operator Precedence
Used to manage the order operators are evaluated.
( ) - operator precedence
[ ] - arrays
{ } content blocks/functions
Associativity
Used to manage the order operators of equal precedence are executed.
Escape Character
" … "
What is the client/server architecture with PHP involved?
3 tiers: Client, Processing Tier & Data Storage Tier
- Client: makes HTTPS requests to the processing tier
- Processing Tier: acts as the middle-man between the web browser client and data storage tier. This is implemeneted with PHP.
- Data Storage Tier: stores data into a database and returns requests presented by the processing tier. This is implemeneted with MySQL and other databases.