Skip to content

Instantly share code, notes, and snippets.

View arrahman's full-sized avatar

Abdur Rahman arrahman

  • Nationwide Appraisals Service
  • Toronto, Canada
View GitHub Profile
SOLID Principles in PHP with Examples
SOLID is an acronym for five object-oriented design principles that help create maintainable and scalable software. Here's each principle explained with PHP examples:
1. Single Responsibility Principle (SRP)
A class should have only one reason to change (one responsibility).
Bad Example:
class User {
public function __construct(private string $name) {}
@arrahman
arrahman / nginx.conf
Created June 14, 2019 20:43 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048