SlideShare a Scribd company logo
OBJECT ORIENTED
PROGRAMMING
PAPER NAME : PROGRAMMING IN PHP
STAFF NAME : MS.V.SHANTHI M.SC,M.PHIL,M,TECH,PGDCA.
CLASS : III BCA
SEMESTER : VI
Object oriented programming
 PHP is a server side scripting language,
mainly used for web development but also
used as a general proposition
programming language. Object Oriented
Programming, is a type of
programming language principle added to php
, that helps in building complex, reusable web
applications.
OBJECT ORIENTED CONCEPTS
• Class
• Object
• Member Variable
• Member Function
• Inheritance
• Parent Class
• Child Class
• Polymorphism
• Data Abstraction
• Encapsulation
• Constructor
• Destructor
Class:
 This is a programmer defined data type which
inject local functions as well as local data. You
can think of a class as a template for making
many specimen of the same kind of object.
Object:
 An single instance of the data structure
defined by a class. You define a class once and
then make many objects that befit to it.
Objects are also known as specimen.
Member Variable:
 These are the variables defined inside a class.
This data will be insensible to the outside of
the class and can be accessed via member
functions. These variables are called virtue of
the object once an object is created.
Member function :
 These are the function clear inside a class and
are used to admission object data.
Inheritance:
 When a class is defined by inheriting current
function of a parent class then it is called
inheritance. Here child class will receive all or
few member functions and variables of a
parent class.
Parent class:
 A class that is inborn from by another class.
This is also called a base class or super class.
Child class:
 A class that receives from another class. This
is also called a subclass or derived class.
Polymorphism:
 This is an object oriented idea where same
function can be used for dissimilar purposes.
For example function name will remain same
but it take different number of clash and can
do different task.
Overloading:
 A type of polymorphism in which some or all
of operators have different implementations
build upon on the types of their arguments.
Build upon functions can also be overloaded
with different implementation.
Data Abstraction:
 Any representation of data in which the
implementation details are occult.
Encapsulation:
 Refers to a idea where we encapsulate all the
data and member functions constant to form
an object.
Constructor:
 Refers to a exceptional type of function which
will be called spontaneously whenever there is
an object formation from a class.
Destructor:
 Refers to a exceptional type of function which
will be called spontaneously whenever an
object is deleted or goes out of scope.
PHP: Inheritance
• Inheritance is a well-established programming
principle.
• Inheritance allows classes to form a hierarchy
like a family tree.
• Allows subclasses to share the techniques and
belongings (which are public or protected) of
its superclass.
• Superclass is the parent class.
• A subclass can add properties and methods.
• Inheritance allows reusing code.
PHP: Inheritance
INTERFACES:
 An interface is a explanation of the actions
that an entity can do.
 Interface is written in the similar way as
the class the statement with interface
keyword.
Rules of Interfaces:
• All methods professed in an interface must be
public; this is the nature of an interface.
• All methods in the interface must be applied
within a class; failure to do so will result in a
fatal error.
• The class applying the interface must use the
exact same technique signatures as are defined
in the interface
• Interfaces can be prolonged like classes using
the spreads operator.
Abstract Classes:
 An abstract class is a class that contains at
least one abstract technique. The abstract
technique is function declaration without
anybody and it has the only name of the
technique and its parameters.
 There can be any number of techniques in the
class and we have to announce the class as
abstract only when there is an abstract method
PHP: Interfaces
• Provides methods to implement.
• Derived classes may implement more than one
interface.
• Interfaces may succeed to from other
interfaces using the extends keyword.
• All techniques are supposed to be public in the
interface definition can be defined explicitly as
public or implicitly.
• When a class equipment multiple interfaces
there cannot be any naming collision between
methods defined in the different interfaces.
PHP: Object Cloning
• Cloning is used to produce a copy of an object.
• An entity copy is produced by using
the clone keyword.
• When an entity is cloned, PHP 5 will perform
a shallow copy of all of the object's properties.
• PHP affords a special method __clone to copy
an object.
• Once the cloning is complete, if a __clone()
method is defined, then the newly created
object's __clone() method will be called, to
allow any necessary properties that need to be
changed.

More Related Content

PPTX
Packages and Interfaces
PDF
Java programming -Object-Oriented Thinking- Inheritance
PPTX
Object oriented programming
DOCX
Class notes(week 7) on packages
PDF
Java packages
PPTX
Object oriented programming
PPTX
Packages
Packages and Interfaces
Java programming -Object-Oriented Thinking- Inheritance
Object oriented programming
Class notes(week 7) on packages
Java packages
Object oriented programming
Packages

What's hot (19)

PPTX
General oop concepts
PPTX
General oop concept
PPT
Object oriented vs. object based programming
PPSX
Object Oriented Programming Overview for the PeopleSoft Developer
PPT
OOP in Java
DOCX
Object oriented programming tutorial
PPTX
Object Oriented Programming Principles
PPTX
Polymorphism
PPT
PHP - Procedural To Object-Oriented
KEY
Practical OOP In Java
PPTX
Packages and interfaces
PPTX
01 introduction to oop and java
PDF
Advanced software engineering lab 2
PPTX
Structure of java program diff c- cpp and java
PPTX
[OOP - Lec 01] Introduction to OOP
PPTX
Introduction to oop and java fundamentals
PPTX
[OOP - Lec 06] Classes and Objects
PDF
Cs8392 oops 5 units notes
PPSX
Java Object Oriented Programming
General oop concepts
General oop concept
Object oriented vs. object based programming
Object Oriented Programming Overview for the PeopleSoft Developer
OOP in Java
Object oriented programming tutorial
Object Oriented Programming Principles
Polymorphism
PHP - Procedural To Object-Oriented
Practical OOP In Java
Packages and interfaces
01 introduction to oop and java
Advanced software engineering lab 2
Structure of java program diff c- cpp and java
[OOP - Lec 01] Introduction to OOP
Introduction to oop and java fundamentals
[OOP - Lec 06] Classes and Objects
Cs8392 oops 5 units notes
Java Object Oriented Programming
Ad

Similar to Oopsinphp (20)

PDF
OOP in PHP
PPTX
Lecture-10_PHP-OOP.pptx
PDF
09 Object Oriented Programming in PHP #burningkeyboards
PDF
Object Oriented PHP - PART-1
PPTX
Object oriented programming in php
PPTX
Object Oriented PHP by Dr.C.R.Dhivyaa Kongu Engineering College
PPTX
UNIT III (8).pptx
PPTX
UNIT III (8).pptx
PPT
Class 7 - PHP Object Oriented Programming
PPTX
Ch8(oop)
PPTX
Introduction to PHP and MySql basics.pptx
PPT
PHP- Introduction to Object Oriented PHP
PPT
PDF
A Gentle Introduction To Object Oriented Php
PPTX
FFW Gabrovo PMG - PHP OOP Part 3
PPTX
Only oop
PPTX
Object oriented programming in php 5
PPTX
Object oriented programming in php 5
PPTX
Php oop (1)
PPTX
Object oreinted php | OOPs
OOP in PHP
Lecture-10_PHP-OOP.pptx
09 Object Oriented Programming in PHP #burningkeyboards
Object Oriented PHP - PART-1
Object oriented programming in php
Object Oriented PHP by Dr.C.R.Dhivyaa Kongu Engineering College
UNIT III (8).pptx
UNIT III (8).pptx
Class 7 - PHP Object Oriented Programming
Ch8(oop)
Introduction to PHP and MySql basics.pptx
PHP- Introduction to Object Oriented PHP
A Gentle Introduction To Object Oriented Php
FFW Gabrovo PMG - PHP OOP Part 3
Only oop
Object oriented programming in php 5
Object oriented programming in php 5
Php oop (1)
Object oreinted php | OOPs
Ad

Recently uploaded (20)

PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
Classroom Observation Tools for Teachers
PDF
01-Introduction-to-Information-Management.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
Institutional Correction lecture only . . .
PPTX
PPH.pptx obstetrics and gynecology in nursing
PPTX
Pharma ospi slides which help in ospi learning
PDF
Pre independence Education in Inndia.pdf
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Supply Chain Operations Speaking Notes -ICLT Program
Module 4: Burden of Disease Tutorial Slides S2 2025
Classroom Observation Tools for Teachers
01-Introduction-to-Information-Management.pdf
Final Presentation General Medicine 03-08-2024.pptx
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
human mycosis Human fungal infections are called human mycosis..pptx
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Microbial disease of the cardiovascular and lymphatic systems
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Institutional Correction lecture only . . .
PPH.pptx obstetrics and gynecology in nursing
Pharma ospi slides which help in ospi learning
Pre independence Education in Inndia.pdf
VCE English Exam - Section C Student Revision Booklet
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
Week 4 Term 3 Study Techniques revisited.pptx

Oopsinphp

  • 2. PAPER NAME : PROGRAMMING IN PHP STAFF NAME : MS.V.SHANTHI M.SC,M.PHIL,M,TECH,PGDCA. CLASS : III BCA SEMESTER : VI
  • 3. Object oriented programming  PHP is a server side scripting language, mainly used for web development but also used as a general proposition programming language. Object Oriented Programming, is a type of programming language principle added to php , that helps in building complex, reusable web applications.
  • 4. OBJECT ORIENTED CONCEPTS • Class • Object • Member Variable • Member Function • Inheritance • Parent Class • Child Class • Polymorphism • Data Abstraction • Encapsulation • Constructor • Destructor
  • 5. Class:  This is a programmer defined data type which inject local functions as well as local data. You can think of a class as a template for making many specimen of the same kind of object.
  • 6. Object:  An single instance of the data structure defined by a class. You define a class once and then make many objects that befit to it. Objects are also known as specimen.
  • 7. Member Variable:  These are the variables defined inside a class. This data will be insensible to the outside of the class and can be accessed via member functions. These variables are called virtue of the object once an object is created.
  • 8. Member function :  These are the function clear inside a class and are used to admission object data. Inheritance:  When a class is defined by inheriting current function of a parent class then it is called inheritance. Here child class will receive all or few member functions and variables of a parent class.
  • 9. Parent class:  A class that is inborn from by another class. This is also called a base class or super class. Child class:  A class that receives from another class. This is also called a subclass or derived class.
  • 10. Polymorphism:  This is an object oriented idea where same function can be used for dissimilar purposes. For example function name will remain same but it take different number of clash and can do different task. Overloading:  A type of polymorphism in which some or all of operators have different implementations build upon on the types of their arguments. Build upon functions can also be overloaded with different implementation.
  • 11. Data Abstraction:  Any representation of data in which the implementation details are occult. Encapsulation:  Refers to a idea where we encapsulate all the data and member functions constant to form an object.
  • 12. Constructor:  Refers to a exceptional type of function which will be called spontaneously whenever there is an object formation from a class. Destructor:  Refers to a exceptional type of function which will be called spontaneously whenever an object is deleted or goes out of scope.
  • 13. PHP: Inheritance • Inheritance is a well-established programming principle. • Inheritance allows classes to form a hierarchy like a family tree. • Allows subclasses to share the techniques and belongings (which are public or protected) of its superclass. • Superclass is the parent class. • A subclass can add properties and methods. • Inheritance allows reusing code.
  • 15. INTERFACES:  An interface is a explanation of the actions that an entity can do.  Interface is written in the similar way as the class the statement with interface keyword.
  • 16. Rules of Interfaces: • All methods professed in an interface must be public; this is the nature of an interface. • All methods in the interface must be applied within a class; failure to do so will result in a fatal error. • The class applying the interface must use the exact same technique signatures as are defined in the interface • Interfaces can be prolonged like classes using the spreads operator.
  • 17. Abstract Classes:  An abstract class is a class that contains at least one abstract technique. The abstract technique is function declaration without anybody and it has the only name of the technique and its parameters.  There can be any number of techniques in the class and we have to announce the class as abstract only when there is an abstract method
  • 18. PHP: Interfaces • Provides methods to implement. • Derived classes may implement more than one interface. • Interfaces may succeed to from other interfaces using the extends keyword. • All techniques are supposed to be public in the interface definition can be defined explicitly as public or implicitly. • When a class equipment multiple interfaces there cannot be any naming collision between methods defined in the different interfaces.
  • 19. PHP: Object Cloning • Cloning is used to produce a copy of an object. • An entity copy is produced by using the clone keyword. • When an entity is cloned, PHP 5 will perform a shallow copy of all of the object's properties. • PHP affords a special method __clone to copy an object. • Once the cloning is complete, if a __clone() method is defined, then the newly created object's __clone() method will be called, to allow any necessary properties that need to be changed.