SlideShare ist ein Scribd-Unternehmen logo
1 von 23
PHP Interview Questions
Regarding OOPs
From Version Up IT Training -
https://versionup.in/
1
1.What Is PHP?
 PHP:Hypertext Preprocessor.
 PHP is a server side scripting language that
is embedded in HTML. It is used to manage
dynamic content, databases, session tracking,
even build entire e-commerce sites.
If You want to Learn PHP Contact On +91 8780656929
https://versionup.in/
2
Scripting
Javascript,PHP,
VB Script
Programming
Java,C,C++
Languages
If You want to Learn PHP Contact On +91 8780656929
https://versionup.in/
3
2.Why You Choose PHP?
 Open Source
High Performing
Flexible and Dynamic
Effective Frameworks And CMS
Large Community
If You want to Learn PHP Contact On +91 8780656929
https://versionup.in/
4
3. What's the latest version of php?
It’s 7.4.4 => 19 Mar 2020
If You want to Learn PHP Contact On +91 8780656929
https://versionup.in/
5
4. What are the major difference
between PHP 5 and PHP 7?
 Performance
 Declaring The Return Type
 Error Handling
 Spaceship Operator
 Anonymous Class
 New Operators
If You want to Learn PHP Contact On +91 8780656929
https://versionup.in/
6
5. Is PHP a strongly typed language?
No. PHP is a weakly typed or loosely typed
language
Sample code:
• $var = "Hello"; //String
• $var = 10; //Integer
If You want to Learn PHP Contact On +91 8780656929
https://versionup.in/
7
6.What is a class?
Collection Of Data member and member
Functions.
Example:
class Person{
public $name;
public $age;
}
If You want to Learn PHP Contact On +91 8780656929
https://versionup.in/
8
7. What is a Object?
Object is real time entity.
Object has some properties and behaviors.
$obj = new MyClass();
If You want to Learn PHP Contact On +91 8780656929
https://versionup.in/
9
8.What is Constructor and
Destructor?
Constructor:
Constructor is a special type of function
which will be called automatically
whenever there is any object created from
a class.
If You want to Learn PHP Contact On +91 8780656929
https://versionup.in/
10
If You want to Learn PHP Contact On +91 8780656929
https://versionup.in/
11
Destructor:
Destructor is a special type of function which
will be called automatically whenever any
object is deleted or goes out of scope.
9.What are access modifiers?
Public
Private
Protected
If You want to Learn PHP Contact On +91 8780656929
https://versionup.in/
12
10. What is Encapsulation?
Wrapping up member variables and methods
together into a single unit (i.e. Class) is called
Encapsulation.
If You want to Learn PHP Contact On +91 8780656929
https://versionup.in/
13
11. What is Abstraction?
Abstraction is a concept in which
implementation details are hidden..
If You want to Learn PHP Contact On +91 8780656929
https://versionup.in/
14
12.Explain about polymorphism?
One thing, can use in different forms
1)Function Overloading
2)Function Overriding
If You want to Learn PHP Contact On +91 8780656929
https://versionup.in/
15
12.Explain about polymorphism?
One thing, can use in different forms
1)Function Overloading
2)Function Overriding
If You want to Learn PHP Contact On +91 8780656929
https://versionup.in/
16
13. Magic Methods in PHP
Construct
Destruct
Clone
Call
Autoload
If You want to Learn PHP Contact On +91 8780656929
https://versionup.in/
17
14.Difference Between Interfaces &
Abstract Class
Interface:
An interface is an agreement or a contract.
When a class implements an interface, It
means it contains same public methods of an
interface with their implementation.
If You want to Learn PHP Contact On +91 8780656929
https://versionup.in/
18
If You want to Learn PHP Contact On +91 8780656929
https://versionup.in/
19
Abstract class Interface
In abstract class a method must be
declared as abstract. Abstract methods
doesn’t have any implementation.
In interface all the methods by default are
abstract.
Abstract class can also contain member
variables and concrete
functions/methods.
Interfaces cannot contain any member
variables and concrete functions/methods
except constants.
An Abstract methods can be declare
with access modifiers like public,
protected etc. Concrete Class which is
extending the abstract class must be
defined with the same or visibility.
All methods declared in an interface must
be public.
A class can Inherits only one Abstract
class and Multiple inheritance is not
possible for Abstract class.
A class can implements many interfaces
and Multiple interface inheritance is
possible.
Only complete member of abstract class
can be static.
Memebrs of Interface can not be static.
15.What is STATIC keyword and what
is it's use in PHP ?
static member
static Function
If You want to Learn PHP Contact On +91 8780656929
https://versionup.in/
20
16.What is Traits in PHP?
Traits are a mechanism for code reuse in single
inheritance languages such as PHP.
If You want to Learn PHP Contact On +91 8780656929
https://versionup.in/
21
17. What are the advantages of
object oriented programming?
Code Resusability
Modularity
Flexibility
Maintainability
Security
Testability
If You want to Learn PHP Contact On +91 8780656929
https://versionup.in/
22
About Us
We Are Proving Professional It Training. If you
Want to learn Any New Technology you can
contact us on :
Contact On :
https://versionup.in/
Call On :+91 8780656929
If You want to Learn PHP Contact On +91 8780656929
https://versionup.in/
23

Weitere ähnliche Inhalte

Ähnlich wie Php OOP interview questions

Object oreinted php | OOPs
Object oreinted php | OOPsObject oreinted php | OOPs
Object oreinted php | OOPsRavi Bhadauria
 
A Good PHP Framework For Beginners Like Me!
A Good PHP Framework For Beginners Like Me!A Good PHP Framework For Beginners Like Me!
A Good PHP Framework For Beginners Like Me!Muhammad Ghazali
 
chapter 5 Server-Side Scripting (PHP).pdf
chapter 5 Server-Side Scripting (PHP).pdfchapter 5 Server-Side Scripting (PHP).pdf
chapter 5 Server-Side Scripting (PHP).pdfburasyacob012
 
Workshop: Refactoring Legacy PHP: The Complete Guide
Workshop: Refactoring Legacy PHP: The Complete Guide Workshop: Refactoring Legacy PHP: The Complete Guide
Workshop: Refactoring Legacy PHP: The Complete Guide Junade Ali
 
OOFeatures_revised-2.pptx
OOFeatures_revised-2.pptxOOFeatures_revised-2.pptx
OOFeatures_revised-2.pptxssuser84e52e
 
PHP Interview Questions for Freshers 2018
PHP Interview Questions for Freshers 2018PHP Interview Questions for Freshers 2018
PHP Interview Questions for Freshers 2018AshokKumar3319
 
The PHP mysqlnd plugin talk - plugins an alternative to MySQL Proxy
The PHP mysqlnd plugin talk - plugins an alternative to MySQL ProxyThe PHP mysqlnd plugin talk - plugins an alternative to MySQL Proxy
The PHP mysqlnd plugin talk - plugins an alternative to MySQL ProxyUlf Wendel
 
GTU MCA PHP Interview Questions And Answers for freshers
GTU MCA PHP  Interview Questions And Answers for freshersGTU MCA PHP  Interview Questions And Answers for freshers
GTU MCA PHP Interview Questions And Answers for freshersTOPS Technologies
 
C#.net interview questions for dynamics 365 ce crm developers
C#.net interview questions for dynamics 365 ce crm developersC#.net interview questions for dynamics 365 ce crm developers
C#.net interview questions for dynamics 365 ce crm developersSanjaya Prakash Pradhan
 
Constructor and encapsulation in php
Constructor and encapsulation in phpConstructor and encapsulation in php
Constructor and encapsulation in phpSHIVANI SONI
 
The power of mysqlnd plugins
The power of mysqlnd pluginsThe power of mysqlnd plugins
The power of mysqlnd pluginsUlf Wendel
 
Object-oriented programming 3.pptx
Object-oriented programming 3.pptxObject-oriented programming 3.pptx
Object-oriented programming 3.pptxAdikhan27
 
Introduction to PHP OOP
Introduction to PHP OOPIntroduction to PHP OOP
Introduction to PHP OOPfakhrul hasan
 
Fundamentals of programming final
Fundamentals of programming finalFundamentals of programming final
Fundamentals of programming finalRicky Recto
 

Ähnlich wie Php OOP interview questions (20)

PHP Basics
PHP BasicsPHP Basics
PHP Basics
 
Report.docx
Report.docxReport.docx
Report.docx
 
Object oreinted php | OOPs
Object oreinted php | OOPsObject oreinted php | OOPs
Object oreinted php | OOPs
 
A Good PHP Framework For Beginners Like Me!
A Good PHP Framework For Beginners Like Me!A Good PHP Framework For Beginners Like Me!
A Good PHP Framework For Beginners Like Me!
 
php questions
php questions php questions
php questions
 
chapter 5 Server-Side Scripting (PHP).pdf
chapter 5 Server-Side Scripting (PHP).pdfchapter 5 Server-Side Scripting (PHP).pdf
chapter 5 Server-Side Scripting (PHP).pdf
 
Workshop: Refactoring Legacy PHP: The Complete Guide
Workshop: Refactoring Legacy PHP: The Complete Guide Workshop: Refactoring Legacy PHP: The Complete Guide
Workshop: Refactoring Legacy PHP: The Complete Guide
 
OOFeatures_revised-2.pptx
OOFeatures_revised-2.pptxOOFeatures_revised-2.pptx
OOFeatures_revised-2.pptx
 
PHP Interview Questions for Freshers 2018
PHP Interview Questions for Freshers 2018PHP Interview Questions for Freshers 2018
PHP Interview Questions for Freshers 2018
 
The PHP mysqlnd plugin talk - plugins an alternative to MySQL Proxy
The PHP mysqlnd plugin talk - plugins an alternative to MySQL ProxyThe PHP mysqlnd plugin talk - plugins an alternative to MySQL Proxy
The PHP mysqlnd plugin talk - plugins an alternative to MySQL Proxy
 
GTU MCA PHP Interview Questions And Answers for freshers
GTU MCA PHP  Interview Questions And Answers for freshersGTU MCA PHP  Interview Questions And Answers for freshers
GTU MCA PHP Interview Questions And Answers for freshers
 
C#.net interview questions for dynamics 365 ce crm developers
C#.net interview questions for dynamics 365 ce crm developersC#.net interview questions for dynamics 365 ce crm developers
C#.net interview questions for dynamics 365 ce crm developers
 
Constructor and encapsulation in php
Constructor and encapsulation in phpConstructor and encapsulation in php
Constructor and encapsulation in php
 
The power of mysqlnd plugins
The power of mysqlnd pluginsThe power of mysqlnd plugins
The power of mysqlnd plugins
 
Object-oriented programming 3.pptx
Object-oriented programming 3.pptxObject-oriented programming 3.pptx
Object-oriented programming 3.pptx
 
Software Development with PHP & Laravel
Software Development  with PHP & LaravelSoftware Development  with PHP & Laravel
Software Development with PHP & Laravel
 
Introduction to PHP OOP
Introduction to PHP OOPIntroduction to PHP OOP
Introduction to PHP OOP
 
Fundamentals of programming final
Fundamentals of programming finalFundamentals of programming final
Fundamentals of programming final
 
Guidelines php 8 gig
Guidelines php 8 gigGuidelines php 8 gig
Guidelines php 8 gig
 
How PHP works
How PHP works How PHP works
How PHP works
 

Kürzlich hochgeladen

THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxPoojaSen20
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Kürzlich hochgeladen (20)

THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 

Php OOP interview questions

  • 1. PHP Interview Questions Regarding OOPs From Version Up IT Training - https://versionup.in/ 1
  • 2. 1.What Is PHP?  PHP:Hypertext Preprocessor.  PHP is a server side scripting language that is embedded in HTML. It is used to manage dynamic content, databases, session tracking, even build entire e-commerce sites. If You want to Learn PHP Contact On +91 8780656929 https://versionup.in/ 2
  • 3. Scripting Javascript,PHP, VB Script Programming Java,C,C++ Languages If You want to Learn PHP Contact On +91 8780656929 https://versionup.in/ 3
  • 4. 2.Why You Choose PHP?  Open Source High Performing Flexible and Dynamic Effective Frameworks And CMS Large Community If You want to Learn PHP Contact On +91 8780656929 https://versionup.in/ 4
  • 5. 3. What's the latest version of php? It’s 7.4.4 => 19 Mar 2020 If You want to Learn PHP Contact On +91 8780656929 https://versionup.in/ 5
  • 6. 4. What are the major difference between PHP 5 and PHP 7?  Performance  Declaring The Return Type  Error Handling  Spaceship Operator  Anonymous Class  New Operators If You want to Learn PHP Contact On +91 8780656929 https://versionup.in/ 6
  • 7. 5. Is PHP a strongly typed language? No. PHP is a weakly typed or loosely typed language Sample code: • $var = "Hello"; //String • $var = 10; //Integer If You want to Learn PHP Contact On +91 8780656929 https://versionup.in/ 7
  • 8. 6.What is a class? Collection Of Data member and member Functions. Example: class Person{ public $name; public $age; } If You want to Learn PHP Contact On +91 8780656929 https://versionup.in/ 8
  • 9. 7. What is a Object? Object is real time entity. Object has some properties and behaviors. $obj = new MyClass(); If You want to Learn PHP Contact On +91 8780656929 https://versionup.in/ 9
  • 10. 8.What is Constructor and Destructor? Constructor: Constructor is a special type of function which will be called automatically whenever there is any object created from a class. If You want to Learn PHP Contact On +91 8780656929 https://versionup.in/ 10
  • 11. If You want to Learn PHP Contact On +91 8780656929 https://versionup.in/ 11 Destructor: Destructor is a special type of function which will be called automatically whenever any object is deleted or goes out of scope.
  • 12. 9.What are access modifiers? Public Private Protected If You want to Learn PHP Contact On +91 8780656929 https://versionup.in/ 12
  • 13. 10. What is Encapsulation? Wrapping up member variables and methods together into a single unit (i.e. Class) is called Encapsulation. If You want to Learn PHP Contact On +91 8780656929 https://versionup.in/ 13
  • 14. 11. What is Abstraction? Abstraction is a concept in which implementation details are hidden.. If You want to Learn PHP Contact On +91 8780656929 https://versionup.in/ 14
  • 15. 12.Explain about polymorphism? One thing, can use in different forms 1)Function Overloading 2)Function Overriding If You want to Learn PHP Contact On +91 8780656929 https://versionup.in/ 15
  • 16. 12.Explain about polymorphism? One thing, can use in different forms 1)Function Overloading 2)Function Overriding If You want to Learn PHP Contact On +91 8780656929 https://versionup.in/ 16
  • 17. 13. Magic Methods in PHP Construct Destruct Clone Call Autoload If You want to Learn PHP Contact On +91 8780656929 https://versionup.in/ 17
  • 18. 14.Difference Between Interfaces & Abstract Class Interface: An interface is an agreement or a contract. When a class implements an interface, It means it contains same public methods of an interface with their implementation. If You want to Learn PHP Contact On +91 8780656929 https://versionup.in/ 18
  • 19. If You want to Learn PHP Contact On +91 8780656929 https://versionup.in/ 19 Abstract class Interface In abstract class a method must be declared as abstract. Abstract methods doesn’t have any implementation. In interface all the methods by default are abstract. Abstract class can also contain member variables and concrete functions/methods. Interfaces cannot contain any member variables and concrete functions/methods except constants. An Abstract methods can be declare with access modifiers like public, protected etc. Concrete Class which is extending the abstract class must be defined with the same or visibility. All methods declared in an interface must be public. A class can Inherits only one Abstract class and Multiple inheritance is not possible for Abstract class. A class can implements many interfaces and Multiple interface inheritance is possible. Only complete member of abstract class can be static. Memebrs of Interface can not be static.
  • 20. 15.What is STATIC keyword and what is it's use in PHP ? static member static Function If You want to Learn PHP Contact On +91 8780656929 https://versionup.in/ 20
  • 21. 16.What is Traits in PHP? Traits are a mechanism for code reuse in single inheritance languages such as PHP. If You want to Learn PHP Contact On +91 8780656929 https://versionup.in/ 21
  • 22. 17. What are the advantages of object oriented programming? Code Resusability Modularity Flexibility Maintainability Security Testability If You want to Learn PHP Contact On +91 8780656929 https://versionup.in/ 22
  • 23. About Us We Are Proving Professional It Training. If you Want to learn Any New Technology you can contact us on : Contact On : https://versionup.in/ Call On :+91 8780656929 If You want to Learn PHP Contact On +91 8780656929 https://versionup.in/ 23