CodeWithSushil
CodeWithSushil

Sushil Kumar

@CodeWithSushil

A self-taught πŸ•ΈοΈ Web DeveloperΒ πŸ‘¨πŸ»β€πŸ’» || Linux 🐧 Lover || Open source 🌐 contributor πŸ‘₯ || PHP/Laravel 🐘 and JS fanboyπŸ‘¦πŸ» || Creator of 🌿 Supabase-PHP Client 🀝
199 Posts 2K Views
  • No matching results...
  • Searching...

/ 255

Pinned

A common issue in the PHP ecosystem isn’t the language itself β€” it’s the hosting environment.

Many hosting providers offer shared hosting powered by Apache, but the server is often poorly configured. Without proper tuning (MPM settings, OPcache, keep-alive, compression, etc.), even well-written PHP applications can feel slow.

Performance problems are frequently blamed on PHP, while the real bottleneck is misconfigured infrastructure.

Good configuration can make a huge difference.

51

Type Cast in PHP

$age = (int) 21;
echo "My age $age now.";

58

PHP doesn't have an image problem in 2026. It has a tutorial problem.

Too many "learn PHP" articles still teach PHP 5.6 and PHP 7.x patterns while modern PHP has evolved dramatically.

Today’s PHP means:
βœ… Strict Types
βœ… Enums
βœ… Attributes
βœ… Readonly Classes
βœ… Property Hooks
βœ… Dependency Injection
βœ… Composer
βœ… Modern Testing
βœ… Laravel & Symfony

If your tutorial still uses "mysql_*", no namespaces, and no Composer, you're learning PHP historyβ€”not modern PHP.

The PHP ecosystem deserves more up-to-date educational content. πŸš€

#PHP #WebDevelopment #Laravel #Symfony #Programming #OpenSource #PHP85


PHP Enum and Match expression are readable, reusable, and clean syntax.

<?php

enum Operation
{
case Increment;
case Decrement;
}


$result = match($op) {
Operation::Increment => $value + 1,
Operation::Decrement => $value - 1,
};


#PHP8 #enum #match #phptips

97

I finally solved my Composer hanging/stuck issue πŸš€
Set up a local proxy server and routed downloads using PHP stream functions.

Added real-time debugging with log files to trace where it was freezing.

Result: smooth installs, zero guesswork 😌

#PHP #composer #packagist #proxy

98