Хуки свойств в PHP: геттеры и сеттеры не нужны
В версии 8.4 наконец‑то появилась одна из тех фич, о которых давно мечтали многие, — хуки свойств. Что это такое? По сути, это встроенные механизмы get/set для свойств объектов, которые позволяют добавить свою логику при чтении или записи значения прямо внутри определения свойства. Никаких больше громоздких геттеров и сеттеров, никаких загадочных get и set , теперь всё можно сделать красиво и понятно на уровне самих свойств.
https://habr.com/ru/companies/otus/articles/978500/
#php #PHP_84 #хуки_свойств #геттеры_и_сеттеры #свойства_объектов #инкапсуляция #виртуальные_свойства #рефакторинг
Magic Numbers - Hardcoded vs Constants
⚡ Magic Numbers - Hardcoded vs Constants - Code quality comparison! Junior developers make common mistakes, senior devs write clean code. Learn from this! Which approach do you use? #PHP #WebDev #CodingTips #coding
#php #programming #coding #webdevelopment #softwareengineering #juniorvssenior #codereview #programmingtips #phptutorial #codingtutorial #bestpractices #phpprogramming
https://www.youtube.com/watch?v=Jl8JXb1kjbU
https://ko-fi.com/s/042ead1675
I've made this little Yii2 component for storage management in cloud. It supports AWS S3, Azure Blob Storage, Google Cloud Storage but also it can be used for local storage.
#yii2 #php #dev #component #extension
@richardjh @lenko @unknoxx Quality of the technology and market success have almost nothing to do with each other, in practice.
It is quite sad, but painfully true.
#PHP needs a new killer app or killer use case.
Ternary Associativity
PHP ternary operator is left-associative! This trap catches everyone. Can you predict the output?
#php #phptricks #ternary #associativity #phpquiz
https://www.youtube.com/watch?v=qN3jEXSPiZc
After unsuccessfully grappling with more than half a dozen PHP-based open source CMS & gallery apps, I just feel like saying:
Fuck #PHP. May it die soon. May it roast in hell forever.
I was helping a client in one of their private package repos and they wondered why I deleted the composer.lock they had committed. Here are a few reasons. #php #laravel https://masteringlaravel.io/daily/2025-12-22-why-you-dont-need-to-commit-composer-lock-in-a-package-repo
Do you map or loop? 👇
Functional elegance or just fancy syntax? What do you think👇

Data processing in #PHP is still in it's early stages. Don't believe me? Look at your system and tell me how it's handling imports/exports.
Is it perhaps hand written importer/exporter?
Any chance it's using file_get_contents?
What stops you from using a Data Frame?

PHP had a very strong early period, competing with ASP, which was a very rigid technology. It grew rapidly and somewhat wildly, and was massively adopted thanks to the rise of cheap servers with LAMP stacks and WordPress.
Between the language itself and the number of people who programmed terribly, it gained a reputation (not entirely undeserved) among professionals that has become ingrained in their collective consciousness and is still present through jokes and memes.
From version 7 onwards, with Composer, Symfony, Laravel, and other frameworks, programming in PHP is nothing like it used to be, but it's very difficult to change an idea once it becomes universal.
I will postpone the release of the next minor version of the URI toolkit to next year to give me room for the holidays but more importantly because some fixes that will impact all the packages still need some ironing in regards to PHP versions and the upcoming new URI RFC in the works. You may voice your opinion in the PR https://github.com/thephpleague/uri-src/pull/180 or in the RFC discussion https://externals.io/message/129486 some big changes are coming to #PHP #URI #query
Why do many devs have this "mixed feelings" related to PHP?
I'm learning it, while working on forms with the POST method and this question keeps coming back in the back of my mind.
Is the criticism mostly historical or something relevant today?