php.org PHP Logo
Beginner Intermediate Advanced

Search results for: "throw exception"

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...

What is the significance of using a backslash before the Exception class in PHP?

Using a backslash before the Exception class in PHP is significant because it tells PHP to look for the Exception class in the global namespace rather...

Is it recommended to create a separate exception for each error case?

It is not necessary to create a separate exception for each error case, as it can lead to code duplication and make the code harder to maintain. Inste...

What are the differences between using trigger_error and throwing an Exception in PHP?

Using trigger_error in PHP allows you to generate a user-level error message, while throwing an Exception allows you to create a custom exception obje...

How can PHP developers effectively use different exception types to manage program flow without excessive error handling?

To effectively use different exception types in PHP without excessive error handling, developers can create custom exception classes that extend the b...

Showing 11 to 15 of 649 results

‹ 1 2 3 4 5 6 7 8 9 10 ... 129 130 ›
PHP.ORG

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

Legal

  • About
  • Contact / Imprint
  • Terms
  • FAQ

© 2025 php.org. All rights reserved.