TMvK
  • Home

php

A collection of 2 posts

php

PHP - static vs self

PHP's difference between static and self. class Mom { private const DEFAULT_AGE = 21; public static function getName(): string { return 'Alice'; } public function tellAge(int $age = self::DEFAULT_AGE): string { return 'My age is:

TvK
php

Quickie: a = b || c

This little post can be handy specially for full-stack devs, who use JS and PHP. PHP being a requirement here. Do you know what happens when you assign OR-logical expression to a variable?

TvK
TMvK © 2025
Latest Posts Ghost