php.org PHP Logo
Beginner Intermediate Advanced

Search results for: "subclasses"

What are the best practices for accessing objects within objects in PHP, especially when dealing with subclasses?

When accessing objects within objects in PHP, especially when dealing with subclasses, it is best practice to use getter methods to access properties...

What are some best practices for managing database connections in PHP when working with multiple classes and subclasses?

When working with multiple classes and subclasses in PHP, it is essential to efficiently manage database connections to avoid resource wastage and imp...

What are the potential pitfalls of using private methods in PHP classes, as seen in the User class?

The potential pitfall of using private methods in PHP classes is that they cannot be accessed or overridden by subclasses. To solve this issue, consid...

How do frameworks like Symfony and Laravel adhere to or deviate from the Liskov Substitution Principle recommendations regarding Exception handling?

The Liskov Substitution Principle states that objects of a superclass should be replaceable with objects of its subclasses without affecting the progr...

Are there any examples that demonstrate the Factory-Method-Pattern in "real" code, beyond the abstract example with car manufacturers?

The Factory Method Pattern is a design pattern that defines an interface for creating objects but lets subclasses decide which class to instantiate. T...

Showing 6 to 10 of 80 results

‹ 1 2 3 4 5 6 7 8 9 10 ... 15 16 ›
PHP.ORG

A free knowledge base for PHP developers. Open to all.

Legal

  • About
  • Contact / Imprint
  • Terms
  • FAQ

© 2025 php.org. All rights reserved.