PHP OOP Flashcards

(71 cards)

1
Q

Object Oriented Programming is a programming model that is based on the concept of ________ and ________

A

Classes and Objects

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

This is an advantage of OOP that helps in making code much easier to maintain, modify and debug

A

DRY - Don’t Repeat Yourself

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Two main aspects of OOP

A

Classes and Objects

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

A self-contained, independent collection of variables and functions which work together to perform one or more specific tasks

A

Class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

This is individual instance of a class

A

Object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

A class acts as ____ or ____ from which individual objects can be created.

A

Template; Blueprint

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How a class can be declared?

A
  • class keyword
  • pair of curly braces
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Variables within a class

A

properties

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Functions within a class

A

Methods

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How should class names be written in _____ with each word should be ______ and starts with the uppercase letter

A

PascalCase; concatenated

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

It is used to access contained properties and methods of a given object

A

Arrow Symbol (->)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

This is a reference to the calling object

A

$this

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

It allows us to initialize the object’s properties upon creation of an object

A

Constructor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

This function declares the constructor in the class

A

__construct();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

This must be included when declaring a construct

A

Double underscore

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

It is called when the object is destructed or the script is stopped or exited

A

Destructor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

This is called at the end of the script of the class

A

__destruct();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Constructors are invoked automatically every time you _______ while destructors are in automatically invoked when you create a ______

A

create an object; __destruct() function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

One can restrict access to properties and methods by the use of __________, also called as, ___________, for greater control

A

Visibility Keywords; Access Modifiers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

This is a property or method that can be accessed anywhere within or outside of class

A

public

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

This property or method can only be accessed within the class or an inherited class

A

protected

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

This is a property or method that is accessible only within the class that defines it.

A

private

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Classes can inherit the properties and methods of another class using ____ keyword

A

extends

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What is the difference of constant and static variables

A
  • Constants cannot be changed at runtime
  • Static Variables can be changed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
How to access a static variable if inside or outside the class?
Class name followed by :: and the name of the static variable with $
26
How to access a static variable if only accessing in the inside of the class?
self keyword followed by :: and the name of the static variable with $
27
:: is also called as
Resolution operator
28
This is the world's largest Internetwork
Internet
29
This is a unique identification where each computer in the Internet has assigned one
IP address
30
Meaning of IP
Internet Protocol
31
This is an organization that gives IP address to various Internet Service Providers
InterNIC
32
Possible IP addresses in the Internet
4,294,967,296
33
This is the English version of IP address
Domain name
34
The Internet uses _____________, which means not all computers connected to the Internet are the ssame
Client-server relationship
35
Special types of computers that are capable of delivering information and data
Server
36
These are computer that may only receive data
Clients
37
This is the fastest growing part of the Internet
World Wide Web
38
WWW is a/an ____________ on the Internet that allows documents to be connected to other documents by hypertext links
Information system
39
The coding language for WWW as the foundation for all Web pages
Hypertext Markup Language
40
The individual responsible for maintaining and updating content of a WWW document
Webmaster
41
Name given to any computer registered on the WWW as official provider of info and files
Domain name
42
Identification for all WWW documents
Uniform Resource Locator
43
URL Types
1. Web - https://www.server.name 2. Gopher - gopher://gopher.server.name 3.FTP - ftp://ftp.server.name 4. Telnet - telnet://server.name 5. E-mail - mailto:address@server.name
44
The multi-user version of a program called Talk
Internet Relay Chat (IRC)
45
Who developed IRC and who developed?
Jarkko Oikarinen by 1980s
46
Who created WWW
Tim Berners-Lee, 1989
47
One of the most popular methods of obtaining software and documents on the Internet as it basically sets rules for transferring files in a fast, efficient, and reliable way.
File Transfer Protocol
48
One of the first Internet services developed to enable users to transfer files from one place to another.
File Transfer Protocol
49
Four parts of Web URL
1. Protocol 2. Server 3. Path 4. Filename
50
Defined as ways in which computers communicate with each other
Internet Protocols
51
They determine how data is sent, how data is received, what must be done to ensure that the data received is correct, what kind of data is sent, and so on.
Internet Protocols
52
They developed a reference model that identifies carious levels in the network communication
The International Standards Organization (OSI)
53
Was adopted as the standard by the developers of the Internet.
Transmission Control Protocol - Internet Protocol (TCP/IP)
54
TCP/IP is required for ______
Internet connection
55
This is the WWW application-layer protocol
Hypertext Transfer Protocol
56
It defines how Web clients (Internet browsers) request pages from Web servers and how Web servers transfer Web pages to Web clients.
Hypertext Transfer Protocol
57
A web page, also known as ____, consists of objects which may be an HTML file, images, applets and so on
Document
58
This is usually composed of an HTML file and several referenced objects.
Web Page
59
This refers to the address of a resource on the Web.
Uniform Resource Locator
60
This is anything available on the Web like an HTML page, a graphic file or a CGI script
Resource
61
It names a specific resource on the Web.
Uniform Resource Name
62
URL and URN are components of the more general class called
Uniform Resource Identifiers
63
After protocol, a colon separates it from the protocol
Resource Description
64
It is the host element identifies the site address of the computer which is the source of the file being displayed.
Site address
65
Two parts of site address
Machine Name and Domain Name
66
It follows the site address but is separated using a colon.
Port Number
67
Default port number
Port 80
68
Port that is requested by HTTPS
Port 443
69
This is actually pointed whenever you access a resource on the Web or the Internet
Filepath and Filename
70
This feature of URL’s allows you to actually point to a specific location (a section, paragraph, or sentence) within a file to view.
Fragment Identifier
71
These are arguments or data variables passed on to the next resource being retrieved.
Parameters