0% found this document useful (0 votes)
8 views1 page

OOP Concept

oop

Uploaded by

Sabir Hussain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views1 page

OOP Concept

oop

Uploaded by

Sabir Hussain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

PHP(Hypertext Preprocessor/earlier known as Perosnal

Home Page )
79.2% websites are in PHP
0) Simple
1) Open Source(free available for every one)
2) Server side scripting language(writting code and implementing every thing is
done on server side)
3) Fast
4) Highly Flexible (small changes can be done without developer)
5) Interpreted (Interpreted language & doe not compile the entire code that take
less time to run means fast )
6) Create dynamic web Pages
7) Security Encryption
8) Cost Efficient
9) Compatibility(It works with different databases and Programming Languages)
10) Platform Independent(Does not require any plugins to run it can run on any
environment)
11) Large PHP Community (Old language it has grown up to large community)

Body Structure
<?php
Body part
?>

OOP Concepts In PHP

1)Class:- It is a Blue print of an object and provides initial values for the
state.It consist of both data and funtions.Data and functions together are called
an object.
when you define a class the variables used in it are called properties
and functions used in it are called methods.

2)object:- The instance of class is called an object. we can create many objects of
the same kind. A class is incomplete without an instance. e.g A car is a class and
its types like Mersedies, Toyota, and BMW are its instances.
Object of a class is created using a keyword "New". These are created
outside the class.

3)MemberVariables:- Defined within the class and the data can be accessed by member
functions alone. When the objects are created these variables are called the
attributes of an object.

4)MemberFuntions:- Defined within the class and are used to access object data. e.g
function set_name() and get_name().

6)Constructer:- It allows an individual to allot the object properties while the


object creation.when you create a program using constructer php will automatically
call constructer while creating the object. it is defined within the class. It will
be followed by 2 underscores
a keyword name construct. e.g function --construct();

7)Detructer:- This function is called when the object stops working. it start
with 2 underscores and a keyword destruct. e.g function --destruct();

8)Inheritance:-

9)Polymorphysm:-

You might also like