SlideShare a Scribd company logo
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

More Related Content

Similar to Php OOP interview questions (20)

25 php interview questions – codementor
25 php interview questions – codementor25 php interview questions – codementor
25 php interview questions – codementor
Arc & Codementor
 
Php Interview Questions
Php Interview QuestionsPhp Interview Questions
Php Interview Questions
UmeshSingh159
 
Oopsinphp
OopsinphpOopsinphp
Oopsinphp
NithyaNithyav
 
Introduction to PHP OOP
Introduction to PHP OOPIntroduction to PHP OOP
Introduction to PHP OOP
fakhrul hasan
 
PHP Fundamentals: A Comprehensive Introduction
PHP Fundamentals: A Comprehensive IntroductionPHP Fundamentals: A Comprehensive Introduction
PHP Fundamentals: A Comprehensive Introduction
Nilesh Valva
 
PHP Interview Questions
PHP Interview QuestionsPHP Interview Questions
PHP Interview Questions
MaryamAnwar10
 
09 Object Oriented Programming in PHP #burningkeyboards
09 Object Oriented Programming in PHP #burningkeyboards09 Object Oriented Programming in PHP #burningkeyboards
09 Object Oriented Programming in PHP #burningkeyboards
Denis Ristic
 
Php interview questions with answer
Php interview questions with answerPhp interview questions with answer
Php interview questions with answer
Soba Arjun
 
Introduction to PHP and MySql basics.pptx
Introduction to PHP and MySql basics.pptxIntroduction to PHP and MySql basics.pptx
Introduction to PHP and MySql basics.pptx
PriyankaKupneshi
 
Object Oriented Programming with Laravel - Session 1
Object Oriented Programming with Laravel - Session 1Object Oriented Programming with Laravel - Session 1
Object Oriented Programming with Laravel - Session 1
Shahrzad Peyman
 
Unit 4-6 sem 7 Web Technologies.pptx
Unit 4-6 sem 7    Web  Technologies.pptxUnit 4-6 sem 7    Web  Technologies.pptx
Unit 4-6 sem 7 Web Technologies.pptx
prathameshp9922
 
Top 100 PHP Questions and Answers
Top 100 PHP Questions and AnswersTop 100 PHP Questions and Answers
Top 100 PHP Questions and Answers
iimjobs and hirist
 
08 Advanced PHP #burningkeyboards
08 Advanced PHP #burningkeyboards08 Advanced PHP #burningkeyboards
08 Advanced PHP #burningkeyboards
Denis Ristic
 
Lecture-10_PHP-OOP.pptx
Lecture-10_PHP-OOP.pptxLecture-10_PHP-OOP.pptx
Lecture-10_PHP-OOP.pptx
ShaownRoy1
 
PHP Reviewer
PHP ReviewerPHP Reviewer
PHP Reviewer
Cecilia Pamfilo
 
PHP Classes in Pune
PHP Classes in PunePHP Classes in Pune
PHP Classes in Pune
Classboat.com
 
Object oreinted php | OOPs
Object oreinted php | OOPsObject oreinted php | OOPs
Object oreinted php | OOPs
Ravi Bhadauria
 
php questions
php questions php questions
php questions
Vijayashree Bca
 
Synapseindia object oriented programming in php
Synapseindia object oriented programming in phpSynapseindia object oriented programming in php
Synapseindia object oriented programming in php
Synapseindiappsdevelopment
 
PHP Interview Questions for Freshers 2018
PHP Interview Questions for Freshers 2018PHP Interview Questions for Freshers 2018
PHP Interview Questions for Freshers 2018
AshokKumar3319
 
25 php interview questions – codementor
25 php interview questions – codementor25 php interview questions – codementor
25 php interview questions – codementor
Arc & Codementor
 
Php Interview Questions
Php Interview QuestionsPhp Interview Questions
Php Interview Questions
UmeshSingh159
 
Introduction to PHP OOP
Introduction to PHP OOPIntroduction to PHP OOP
Introduction to PHP OOP
fakhrul hasan
 
PHP Fundamentals: A Comprehensive Introduction
PHP Fundamentals: A Comprehensive IntroductionPHP Fundamentals: A Comprehensive Introduction
PHP Fundamentals: A Comprehensive Introduction
Nilesh Valva
 
PHP Interview Questions
PHP Interview QuestionsPHP Interview Questions
PHP Interview Questions
MaryamAnwar10
 
09 Object Oriented Programming in PHP #burningkeyboards
09 Object Oriented Programming in PHP #burningkeyboards09 Object Oriented Programming in PHP #burningkeyboards
09 Object Oriented Programming in PHP #burningkeyboards
Denis Ristic
 
Php interview questions with answer
Php interview questions with answerPhp interview questions with answer
Php interview questions with answer
Soba Arjun
 
Introduction to PHP and MySql basics.pptx
Introduction to PHP and MySql basics.pptxIntroduction to PHP and MySql basics.pptx
Introduction to PHP and MySql basics.pptx
PriyankaKupneshi
 
Object Oriented Programming with Laravel - Session 1
Object Oriented Programming with Laravel - Session 1Object Oriented Programming with Laravel - Session 1
Object Oriented Programming with Laravel - Session 1
Shahrzad Peyman
 
Unit 4-6 sem 7 Web Technologies.pptx
Unit 4-6 sem 7    Web  Technologies.pptxUnit 4-6 sem 7    Web  Technologies.pptx
Unit 4-6 sem 7 Web Technologies.pptx
prathameshp9922
 
Top 100 PHP Questions and Answers
Top 100 PHP Questions and AnswersTop 100 PHP Questions and Answers
Top 100 PHP Questions and Answers
iimjobs and hirist
 
08 Advanced PHP #burningkeyboards
08 Advanced PHP #burningkeyboards08 Advanced PHP #burningkeyboards
08 Advanced PHP #burningkeyboards
Denis Ristic
 
Lecture-10_PHP-OOP.pptx
Lecture-10_PHP-OOP.pptxLecture-10_PHP-OOP.pptx
Lecture-10_PHP-OOP.pptx
ShaownRoy1
 
Object oreinted php | OOPs
Object oreinted php | OOPsObject oreinted php | OOPs
Object oreinted php | OOPs
Ravi Bhadauria
 
Synapseindia object oriented programming in php
Synapseindia object oriented programming in phpSynapseindia object oriented programming in php
Synapseindia object oriented programming in php
Synapseindiappsdevelopment
 
PHP Interview Questions for Freshers 2018
PHP Interview Questions for Freshers 2018PHP Interview Questions for Freshers 2018
PHP Interview Questions for Freshers 2018
AshokKumar3319
 

Recently uploaded (20)

Webcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Webcrawler_Mule_AIChain_MuleSoft_Meetup_HyderabadWebcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Webcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Veera Pallapu
 
Exploring Ocean Floor Features for Middle School
Exploring Ocean Floor Features for Middle SchoolExploring Ocean Floor Features for Middle School
Exploring Ocean Floor Features for Middle School
Marie
 
Gibson "Secrets to Changing Behaviour in Scholarly Communication: A 2025 NISO...
Gibson "Secrets to Changing Behaviour in Scholarly Communication: A 2025 NISO...Gibson "Secrets to Changing Behaviour in Scholarly Communication: A 2025 NISO...
Gibson "Secrets to Changing Behaviour in Scholarly Communication: A 2025 NISO...
National Information Standards Organization (NISO)
 
Unit 3 Poster Sketches with annotations.pptx
Unit 3 Poster Sketches with annotations.pptxUnit 3 Poster Sketches with annotations.pptx
Unit 3 Poster Sketches with annotations.pptx
bobby205207
 
How to Create Quotation Templates Sequence in Odoo 18 Sales
How to Create Quotation Templates Sequence in Odoo 18 SalesHow to Create Quotation Templates Sequence in Odoo 18 Sales
How to Create Quotation Templates Sequence in Odoo 18 Sales
Celine George
 
Parenting Teens: Supporting Trust, resilience and independence
Parenting Teens: Supporting Trust, resilience and independenceParenting Teens: Supporting Trust, resilience and independence
Parenting Teens: Supporting Trust, resilience and independence
Pooky Knightsmith
 
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
EduSkills OECD
 
Unit- 4 Biostatistics & Research Methodology.pdf
Unit- 4 Biostatistics & Research Methodology.pdfUnit- 4 Biostatistics & Research Methodology.pdf
Unit- 4 Biostatistics & Research Methodology.pdf
KRUTIKA CHANNE
 
EUPHORIA GENERAL QUIZ FINALS | QUIZ CLUB OF PSGCAS | 21 MARCH 2025
EUPHORIA GENERAL QUIZ FINALS | QUIZ CLUB OF PSGCAS | 21 MARCH 2025EUPHORIA GENERAL QUIZ FINALS | QUIZ CLUB OF PSGCAS | 21 MARCH 2025
EUPHORIA GENERAL QUIZ FINALS | QUIZ CLUB OF PSGCAS | 21 MARCH 2025
Quiz Club of PSG College of Arts & Science
 
Final Sketch Designs for poster production.pptx
Final Sketch Designs for poster production.pptxFinal Sketch Designs for poster production.pptx
Final Sketch Designs for poster production.pptx
bobby205207
 
LDMMIA Reiki Yoga Next Week Grad Updates
LDMMIA Reiki Yoga Next Week Grad UpdatesLDMMIA Reiki Yoga Next Week Grad Updates
LDMMIA Reiki Yoga Next Week Grad Updates
LDM & Mia eStudios
 
Artificial intelligence Presented by JM.
Artificial intelligence Presented by JM.Artificial intelligence Presented by JM.
Artificial intelligence Presented by JM.
jmansha170
 
BUSINESS QUIZ PRELIMS | QUIZ CLUB OF PSGCAS | 9 SEPTEMBER 2024
BUSINESS QUIZ PRELIMS | QUIZ CLUB OF PSGCAS | 9 SEPTEMBER 2024BUSINESS QUIZ PRELIMS | QUIZ CLUB OF PSGCAS | 9 SEPTEMBER 2024
BUSINESS QUIZ PRELIMS | QUIZ CLUB OF PSGCAS | 9 SEPTEMBER 2024
Quiz Club of PSG College of Arts & Science
 
Allomorps and word formation.pptx - Google Slides.pdf
Allomorps and word formation.pptx - Google Slides.pdfAllomorps and word formation.pptx - Google Slides.pdf
Allomorps and word formation.pptx - Google Slides.pdf
Abha Pandey
 
LDMMIA Free Reiki Yoga S9 Grad Level Intuition II
LDMMIA Free Reiki Yoga S9 Grad Level Intuition IILDMMIA Free Reiki Yoga S9 Grad Level Intuition II
LDMMIA Free Reiki Yoga S9 Grad Level Intuition II
LDM & Mia eStudios
 
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptxDiptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Arshad Shaikh
 
Pfeiffer "Secrets to Changing Behavior in Scholarly Communication: A 2025 NIS...
Pfeiffer "Secrets to Changing Behavior in Scholarly Communication: A 2025 NIS...Pfeiffer "Secrets to Changing Behavior in Scholarly Communication: A 2025 NIS...
Pfeiffer "Secrets to Changing Behavior in Scholarly Communication: A 2025 NIS...
National Information Standards Organization (NISO)
 
Rai dyansty Chach or Brahamn dynasty, History of Dahir History of Sindh NEP.pptx
Rai dyansty Chach or Brahamn dynasty, History of Dahir History of Sindh NEP.pptxRai dyansty Chach or Brahamn dynasty, History of Dahir History of Sindh NEP.pptx
Rai dyansty Chach or Brahamn dynasty, History of Dahir History of Sindh NEP.pptx
Dr. Ravi Shankar Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
Different pricelists for different shops in odoo Point of Sale in Odoo 17
Different pricelists for different shops in odoo Point of Sale in Odoo 17Different pricelists for different shops in odoo Point of Sale in Odoo 17
Different pricelists for different shops in odoo Point of Sale in Odoo 17
Celine George
 
MATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKANMATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKAN
aditya23173
 
Webcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Webcrawler_Mule_AIChain_MuleSoft_Meetup_HyderabadWebcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Webcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Veera Pallapu
 
Exploring Ocean Floor Features for Middle School
Exploring Ocean Floor Features for Middle SchoolExploring Ocean Floor Features for Middle School
Exploring Ocean Floor Features for Middle School
Marie
 
Unit 3 Poster Sketches with annotations.pptx
Unit 3 Poster Sketches with annotations.pptxUnit 3 Poster Sketches with annotations.pptx
Unit 3 Poster Sketches with annotations.pptx
bobby205207
 
How to Create Quotation Templates Sequence in Odoo 18 Sales
How to Create Quotation Templates Sequence in Odoo 18 SalesHow to Create Quotation Templates Sequence in Odoo 18 Sales
How to Create Quotation Templates Sequence in Odoo 18 Sales
Celine George
 
Parenting Teens: Supporting Trust, resilience and independence
Parenting Teens: Supporting Trust, resilience and independenceParenting Teens: Supporting Trust, resilience and independence
Parenting Teens: Supporting Trust, resilience and independence
Pooky Knightsmith
 
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
EduSkills OECD
 
Unit- 4 Biostatistics & Research Methodology.pdf
Unit- 4 Biostatistics & Research Methodology.pdfUnit- 4 Biostatistics & Research Methodology.pdf
Unit- 4 Biostatistics & Research Methodology.pdf
KRUTIKA CHANNE
 
Final Sketch Designs for poster production.pptx
Final Sketch Designs for poster production.pptxFinal Sketch Designs for poster production.pptx
Final Sketch Designs for poster production.pptx
bobby205207
 
LDMMIA Reiki Yoga Next Week Grad Updates
LDMMIA Reiki Yoga Next Week Grad UpdatesLDMMIA Reiki Yoga Next Week Grad Updates
LDMMIA Reiki Yoga Next Week Grad Updates
LDM & Mia eStudios
 
Artificial intelligence Presented by JM.
Artificial intelligence Presented by JM.Artificial intelligence Presented by JM.
Artificial intelligence Presented by JM.
jmansha170
 
Allomorps and word formation.pptx - Google Slides.pdf
Allomorps and word formation.pptx - Google Slides.pdfAllomorps and word formation.pptx - Google Slides.pdf
Allomorps and word formation.pptx - Google Slides.pdf
Abha Pandey
 
LDMMIA Free Reiki Yoga S9 Grad Level Intuition II
LDMMIA Free Reiki Yoga S9 Grad Level Intuition IILDMMIA Free Reiki Yoga S9 Grad Level Intuition II
LDMMIA Free Reiki Yoga S9 Grad Level Intuition II
LDM & Mia eStudios
 
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptxDiptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Arshad Shaikh
 
Different pricelists for different shops in odoo Point of Sale in Odoo 17
Different pricelists for different shops in odoo Point of Sale in Odoo 17Different pricelists for different shops in odoo Point of Sale in Odoo 17
Different pricelists for different shops in odoo Point of Sale in Odoo 17
Celine George
 
MATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKANMATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKAN
aditya23173
 
Ad

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