PHP

How to Handle Getters When They Have Nothing to Return? (phpfashion.com)

Software development often presents dilemmas, such as how to handle situations when a getter has nothing to return. In this article, we'll explore three strategies for implementing getters in PHP, which affect the structure and readability of code, each with its own specific advantages and…

Cool features of Swiss Knife (tomasvotruba.com)

When using a Swiss knife, we think of a tool with many practical abilities. They're useful for different situations we might experience in the wild. Opening a box of milk? Here is a knife. Cutting wood to start a fire? Here is a chainsaw. Are the letters on the paint bucket too tiny? Try this magnifying class. Now, we apply the...

Get Quick Error Count for each PHPStan level (tomasvotruba.com)

When I come to a new project, I want to make a rough idea of what I'm dealing with in a few minutes. I usually check composer.json and measure the lines. Then, I'd love to run PHPStan and get a rough idea of the current state. But are there baselines, custom extensions, global ignores, or no PHPStan at all?

How adding Type Declarations makes Your Code Dangerous (tomasvotruba.com)

...and how to avoid it. Type coverage is a way to gradually add type declarations to your PHP project—step by step, one by one. It's a PHPStan package that helps you maintain a specific minimal level from 0 % to 100 %. Once we reach high coverage of 80-90 %, we feel safer. But our code can actually be in worse, even dangerous,...

Properly restart Opcache after deployment (tideways.com)

When you are deploying code to a server and not with containers then it is critical to know how to properly restart Opcache. Why? Opcache never throws old files out of the cache. Therefore, if a new version is deployed in a completely new directory, all files from the old version will remain in the [...]

  • All
  • Subscribed
  • Moderated
  • Favorites
  • php
  • DreamBathrooms
  • magazineikmin
  • thenastyranch
  • Youngstown
  • Durango
  • rosin
  • slotface
  • GTA5RPClips
  • InstantRegret
  • PowerRangers
  • kavyap
  • tsrsr
  • ngwrru68w68
  • khanakhh
  • Leos
  • hgfsjryuu7
  • everett
  • osvaldo12
  • cisconetworking
  • tacticalgear
  • modclub
  • mdbf
  • vwfavf
  • ethstaker
  • tester
  • normalnudes
  • cubers
  • anitta
  • All magazines