Amazing PHP @phpme Channel on Telegram

Amazing PHP

@phpme


Welcome to the Amazing PHP Channel! Here you can find a lot of interesting articles/news about PHP, frameworks, tools and development.

Support the channel: https://www.paypal.com/donate?hosted_button_id=FAYP5QJH5LVRL

Amazing PHP (English)

Are you a PHP enthusiast looking for a place to stay updated on the latest news, articles, and developments in the PHP world? Look no further, because the Amazing PHP Channel is here to cater to all your PHP needs! With a username of 'phpme,' this channel is dedicated to providing you with a plethora of interesting articles and news about PHP, frameworks, tools, and development.

Whether you are a seasoned PHP developer or just starting out, this channel has something for everyone. Stay informed about the latest updates, best practices, and trends in the PHP community. Engage with like-minded individuals, ask questions, and share your own insights and experiences.

Support the Amazing PHP Channel by visiting our PayPal donation link: https://www.paypal.com/donate?hosted_button_id=FAYP5QJH5LVRL. Your contribution will help us continue to provide valuable content and resources to the PHP community.

Join us today and be part of a vibrant community of PHP enthusiasts. Let's explore the world of PHP together and take our development skills to the next level. Stay connected, stay informed, and stay inspired with the Amazing PHP Channel!

Amazing PHP

02 Oct, 15:20


Do generators really reduce the memory usage?
Recently I noticed some controversy regarding memory usage with generators. It looks like that many people genuinely take generators as a tool that somehow can get them "a big performance boost" when working with large datasets. Sort of a magician's hat, where one can put any amount of data without affecting the PHP process' memory.

Amazing PHP

11 Sep, 13:00


​​An Internet of PHP
PHP is big. The trolls can proclaim its all-but-certain “death” until the cows come home, but no amount of heckling changes that the Internet runs on PHP. The evidence is overwhelming. What follows is a loosely organised collection of precisely that evidence.

Amazing PHP

27 Aug, 17:47


PHP: Named arguments are your friends
I stumbled upon an article in Stitcher.io that, in a few words, declares that developers should be aware that Named Arguments will break things. That’s quite weird when you consider they fix more than what they "break".

Amazing PHP

09 Aug, 17:45


PHP 8: The JIT
The pros and cons of adding a JIT compiler to PHP. Dmitry Stogov recently opened an RFC to add a JIT compiler to PHP. So, what is that about? Does "JIT" mean "instantly better PHP", or is this a more nuanced topic? Today we'll briefly look at what the "JIT" actually does, and more importantly: the difficulties and opportunities it brings to the PHP world.

Amazing PHP

02 Aug, 16:33


Enums in PHP 8.1
They are finally coming — built-in support for enums will be added in PHP 8.1! Some might consider them long overdue, but you don't hear me complain; I'm glad they made it! This post is dedicated to looking at the newly added feature in-depth.

Amazing PHP

20 Jul, 13:21


​​Best practices for writing code comments
While there are many resources to help programmers write better code—such as books and static analyzers—there are few for writing better comments. While it's easy to measure the quantity of comments in a program, it's hard to measure the quality, and the two are not necessarily correlated. A bad comment is worse than no comment at all. Here are some rules to help you achieve a happy medium.

Amazing PHP

29 Jun, 02:06


​​Why our code tends to become big ball of mud over time
Our codebases seem to corrode over time. Overall quality tends to decrease. Each new change is harder to introduce. We all use OOP good practices, control our dependencies, adjust to SOLID principles and use patterns. And even so, our systems head toward becoming a big ball of mud inevitably. It turns out it is not enough to keep systems viable in an environment of relentless change.

Amazing PHP

24 Jun, 14:26


Design Patterns — The Observer Pattern
This is part 2 of my design patterns articles. A lot of credit to Christopher Okhravi. I’m trying to cover all his videos about design patterns from the book "Head First: Design Patterns".

Amazing PHP

10 Jun, 19:46


PHP 8.1 is coming — and it already promises to be one of the best releases
The coming version of PHP, scheduled for November 2021, is already packed with a lot of super exciting features.

Amazing PHP

03 Jun, 18:18


​​Writing better Regular Expressions in PHP
Regular Expressions are powerful, PHP but they are not known to be readable, and more often than not, maintaining a regular expression is not a straight-forward task.

Amazing PHP

02 Jun, 13:51


​​What is Software Architecture?
When it comes to the definition of Software architecture is the process of transforming software features such as flexibility, scale, viability, reusability, and security into a structured solution that meets technological and business aspirations. This definition refers to the features of the software that can affect software architecture. In addition to technical requirements, a long list of features primarily represents a business or operational needs.

Amazing PHP

31 May, 13:17


Double Dispatch
The computation of a method call is only dependent on the object receiving the method call. Most of the time that's enough. However, sometimes we need the computation to also depend on the argument being passed to the method call.
Think you have two hierarchies of objects interacting with each other and the computation of these interactions depends on both objects, not only in one of them. Maybe some examples will make this clearer.

Amazing PHP

30 May, 14:16


​​Writing Clean Code In PHP
In this article, let's learn how to write clean code in PHP. These tips help you to write readable, reusable & refactorable code in PHP.

Amazing PHP

30 May, 01:25


​​5 Books You Must Read as a Developer
In this article, we present a handpicked selection of five books that every developer should read to enrich their professional journey. These literary gems go beyond mere technical instruction manuals, offering profound insights, practical wisdom, and inspiring stories that can shape and elevate your approach to software development. Whether you’re a seasoned programmer looking to expand your horizons or a budding coder seeking guidance, these books will provide valuable perspectives, ignite creativity, and help you navigate the challenges of the ever-evolving tech landscape.

Amazing PHP

29 May, 16:39


The Domain Layer - Clean Architecture & Domain-Driven Design on PHP
The fundamental part of Clean Architecture and Domain-Driven Design is the Domain layer. There all the business and applications rules are laid down and will be controlling the processing of information independently from the infrastructure and frameworks.

Amazing PHP

28 May, 14:09


​​How to connect with gRPC service in PHP application? gRPC PHP tutorial
More and more developers and companies are discovering the benefits of microservices. And while PHP is usually not the first choice for this architecture, it is now more than viable to create efficient web apps based on microservices with PHP. To that end, Google’s gRPC and Protobuf solutions are a big help. Today, I’m going to show you how to use gRPC with PHP.

Amazing PHP

26 May, 17:54


13 Best Practices for Building RESTful APIs
Facebook, GitHub, Google, and many other giants need a way to serve and consume data. A RESTful API is still one of the best choices in today’s dev landscape to serve and consume data.
But have you ever considered learning about industry standards? What are the best practices for designing a RESTful API? In theory, anyone can quickly spin up a data API in less than five minutes — whether it be Node.js, Golang, or Python.

Amazing PHP

25 May, 18:34


Fiendish Functions - Filtering Fact From Fiction
Functional programming is a paradigm that has gained in popularity recently with the rise of several new functional programming languages and integration of new features in existing languages. All the same, there are many concerns about functional programming in the developer community. Is functional programming useful for the PHP developer? Will it add complexity to my codebase? This article will respond to some of these misconceptions.

Amazing PHP

24 May, 16:19


Roadmap to learn Software Design
I have been planning to learn Software Design for a quite a while now but I always ended up finding some other fancy topic. You can be a software engineer with years of experience and still do fine without delving into the meat of Software design but the perks of understanding this complex process are unfathomable.

Amazing PHP

22 May, 16:20


Object Oriented Done Right
Alan Kay, the inventor of the term “object-oriented programming”, told a story once during a talk more than 20 years ago. You can build a dog house using only a hammer, nails, planks, and just a little bit of skill. I figure even I would be able to build it given enough time. Once you've built it you've earned the skills and know-how, and could apply it to other projects. Next, you want to build a cathedral, using the same approach with your hammer, nails, and planks. It's a 100 times larger, but you've done this before — right? It'll only take a little longer.

Amazing PHP

21 May, 17:54


Back the func off, this is my abstraction!
Integrating services over API's exposes your application to a range of possible failures. At scale, any network interaction can and will fail. Implementing a retry mechanism is a common approach to increase fault tolerance. Taking into account how systems fail when designing software can greatly improve the quality of your code. In this blogpost I'd like to show how I approach these kinds of problems.

Amazing PHP

12 May, 02:39


Contract Tests
There is more to the contract of an interface than just the methods it provides. All implementation of this interface actually need to behave consistently in the same situations. This post shows a way how we can test for this.

Amazing PHP

11 May, 13:35


​​Why GraphQL is Taking Over APIs
A few years ago, I managed a team at DocuSign that was tasked with re-writing the main DocuSign web app which was used by tens of millions of users. The APIs didn’t exist yet to support our new shiny front-end app because since the beginning the web app was a .NET monolith. The API team in Seattle was taking the monolith apart and exposing RESTful APIs slowly. This API team consisted of just two engineers and had a release cycle of one month. Our front-end team in San Francisco released every week. The API team release cycle was so long because a lot of (almost all) the functionality had to be tested manually.

Amazing PHP

09 May, 16:02


6 Algorithms Every Developer Should Know
Hello, I am Richard. I am a developer, and you should know that I’m not a big fan of data structures and algorithms. If you can relate to this, don’t worry; after working on many projects (small and large), I discovered the six important algorithms that every developer should know, and these six will almost always solve every problem in your development process.

Amazing PHP

01 May, 17:05


​​Unveiling the secret power of encapsulation
In the world of software development, encapsulation is a fundamental concept that plays a crucial role in building robust, maintainable, and scalable applications. Encapsulation is one of the four pillars of object-oriented programming (OOP), along with inheritance, polymorphism, and abstraction. It provides a mechanism to bundle related data and methods into a single unit, known as a class, and restricts direct access to the internal state of an object.

Amazing PHP

30 Apr, 21:08


​​Upgrading a Project to PHP 8.0
This article is not about new features or comparative tests; first, we need to update the project to make it compatible with PHP 8.
Today, we are going to draw up a plan for the update and discuss the key potential difficulties based on the example of updating a large project from PHP 7.4 to 8.0. Most of the steps will also be helpful when planning an upgrade from earlier versions.

Amazing PHP

27 Apr, 23:23


​​Avoiding the pitfalls of abstract and common services
In the ever-evolving world of software engineering, creating robust and maintainable applications is a constant challenge. One common mistake that engineers often make is creating overly common or abstract services. While the idea of reusability and abstraction is appealing, it can lead to a host of problems, including violations of the single responsibility principle and the open/closed principle. In this article, we will delve into the issues that engineers may encounter when creating generic services and highlight the importance of embracing specificity.

Amazing PHP

26 Apr, 13:18


Do not mock what you do not own
Web applications typically process HTTP requests. Commonly, objects are used to encapsulate request data. Depending on the framework, we may have an interface such as...

Amazing PHP

23 Apr, 14:57


​​Data Transfer Object V3 Modernizes DTOs With PHP 8 Features
Spatie's Data Transfer Object (DTO) package makes constructing objects from arrays a breeze, giving you confidence in the data contained therein. I've been a fan of this package since learning about the initial V1 release, and I hope you'll consider this package for passing around data in your application.

Amazing PHP

10 Apr, 16:23


​​Why we should avoid null in software development
In software development, null is a term that is often used to represent a lack of value or an unknown state. It’s a concept that has been around for a long time and has been a source of confusion and bugs in software development. In this article, we will explore why we should avoid null in software development and what we can do instead.

Amazing PHP

01 Apr, 01:16


Unit testing tips by examples in PHP
In these times, the benefits of writing unit tests are huge. I think that most of the recently started projects contain any unit tests. In enterprise applications with a lot of business logic, unit tests are the most important tests, because they are fast and can us instantly assure that our implementation is correct. However, I often see a problem with good tests in projects, though these tests' benefits are only huge when you have good unit tests. So in these examples, I will try to share some tips on what to do to write good unit tests.

Amazing PHP

01 Apr, 01:15


​​100ms -> 40ms -> 1ms: Maximizing response caching in Laravel
How to take (some) response times from 100ms to 40ms to 1ms.

Amazing PHP

24 Mar, 13:53


Setup Step Debugging in PHP with Xdebug 3 and Docker Compose
In versions of Xdebug before version 3 setting up step debugging for code inside Docker containers has often been challenging to say the least. However, in version 3 it’s become almost trivial. In this short tutorial, I’ll step you through what you need to do, regardless of the (supported) text editor or IDE you’re using.

Amazing PHP

24 Mar, 13:52


​​Does it belong in the application or domain layer?
If you're one of those people who make a separation between an application and a domain layer in their code base (like I do), then a question you'll often have is: does this service go in the application or in the domain layer? It sometimes makes you wonder if the distinction between these layers is superficial after all. I'm not going to write again about what the layers mean, but here is how I decide if a service goes into Application or Domain

Amazing PHP

24 Mar, 13:50


Character escape sequences and numeric notations in PHP
Many modern programming languages support various way to use various characters such as simple English Latin characters, numbers, symbols, Emojis, and various special characters such as a new line or a tab character.

Amazing PHP

19 Feb, 14:16


Stop using setters
In this article, I want to focus your attention on the problem with setters. Let’s talk about the problems:

Amazing PHP

31 Jan, 23:12


Accessing private properties in PHP
Private properties can only be accessed by the class that defines the property… right? Actually, PHP has a few ways to circumvent this: reflection, closures and array casting.

Amazing PHP

26 Jan, 17:10


Starting with Microservices in PHP
In this article, we will take theory and apply it in practice using PHP.
We will use Ecotone Framework and RabbitMQ, to integrate two Services together.

Amazing PHP

23 Jan, 01:40


Unit testing tips by examples in PHP
In these times, the benefits of writing unit tests are huge. I think that most of the recently started projects contain any unit tests. In enterprise applications with a lot of business logic, unit tests are the most important tests, because they are fast and can us instantly assure that our implementation is correct. However, I often see a problem with good tests in projects, though these tests' benefits are only huge when you have good unit tests. So in these examples, I will try to share some tips on what to do to write good unit tests.

Amazing PHP

20 Nov, 15:29


​​Modern PHP data Encryption/Decryption with Sodium extension
Throughout the years PHP has added support for several extensions, libraries, and algorithms to encrypt and decrypt data. With several libraries and extensions with various levels of maintenance, several algorithms each potentially carrying pros and cons, some even inherently being insecure, it is very difficult to select the appropriate PHP extension, library, encryption constructs, and balance the security and performance.