Interface or an Abstract Class which one to use

0 votes
Could you please explain when I should use an abstract class and when I should use a PHP interface?

What is the best way to convert my abstract class into an interface?
Aug 8 in PHP by Kithuzzz
• 11,040 points
31 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In PHP

0 votes
0 answers

file_get_contents("php://input") or $HTTP_RAW_POST_DATA, which one is better to get the body of JSON request?

The file_get_contents("php://input") or $HTTP_RAW_POST_DATA - which one ...READ MORE

Jun 23 in PHP by narikkadan
• 18,480 points
25 views
0 votes
1 answer

How to check whether property exists in object or class in php?

Hello @kartik, Using  property_exists( mixed $class , string $property ...READ MORE

answered Oct 1, 2020 in PHP by Niroj
• 82,780 points
2,607 views
0 votes
1 answer

How to create an interface composed of other interfaces?

Hello, You are looking for the extends keyword: Interface IFoo extends ...READ MORE

answered Nov 5, 2020 in PHP by Niroj
• 82,780 points
94 views
0 votes
1 answer

Error:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 9

Hello @kartik, Replace TYPE=MyISAM with ENGINE=MyISAM The problem was "TYPE=MyISAM" which should ...READ MORE

answered Nov 16, 2020 in PHP by Niroj
• 82,780 points
5,819 views
0 votes
0 answers

How to echo or print an array in PHP?

I have this array: Array ( [data] => ...READ MORE

Jun 13 in PHP by narikkadan
• 18,480 points
21 views
0 votes
0 answers

When to use an interface instead of an abstract class and vice versa

This could be an OOP question in ...READ MORE

Jun 11 in C# by pranav
• 2,580 points
23 views
0 votes
0 answers

What is an abstract class in PHP?

What is an abstract class in PHP? ...READ MORE

Aug 1 in PHP by Kithuzzz
• 11,040 points
16 views
+1 vote
2 answers

Difference: abstract class and interface in Python

If abstract class contains only abstract methods ...READ MORE

answered Jun 21, 2019 in Python by anonymous
6,442 views
0 votes
1 answer

What is the difference between an interface and abstract class?

Interfaces An interface is a contract: The person writing ...READ MORE

answered Nov 30, 2020 in Python by Gitika
• 65,890 points
239 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP