Categories

Here is all articles about php

How to Get a PHP Enum Case from Its Value
php
August 26, 2026 8 minutes reading time

How to Get a PHP Enum Case from Its Value

PHP enums provide a clean way to represent a fixed set of possible values. When working with a backed enum, each enum case has an associated scalar value, such as a string or integer. A common situation is receiving a value from a database, API request, form, or another external source and needing to retrieve […]

PHP Object References: How to Use & References
php
August 16, 2026 8 minutes reading time

PHP Object References: How to Use & References

In PHP, you can create a reference to a variable using the & operator. A reference means that two variables point to the same value, so changing one variable can also affect the other. Here is an example of creating reference in PHP. In the code below $b is a reference to $a, means if […]

PHP final classes
php
July 13, 2026 8 minutes reading time

PHP final classes

Object-oriented programming in PHP gives developers powerful inheritance features. However, not every class is designed to be extended. That’s where the final keyword comes in. A final class explicitly tells PHP that this class cannot be inherited. It protects the class from being extended and helps preserve its intended behavior. When you declare a class […]

Laravel vs WordPress: Which One Should You Choose in 2026?
php
May 14, 2026 8 minutes reading time

Laravel vs WordPress: Which One Should You Choose in 2026?

When developers and business owners start a new web project, one question appears again and again: should you use Laravel or WordPress? At first glance, the comparison may seem unfair. After all, Laravel is a PHP framework, while WordPress is known as a CMS (Content Management System). But the reality is more interesting. Modern WordPress […]

Extract Data from Multidimensional Array
php
April 23, 2026 8 minutes reading time

Extract Data from Multidimensional Array

#Introduction array_column is one of my favorite functions in PHP. When you are dealing with a multidimensional array and want to extract a specific piece of data from that structure, array_column is extremely helpful. By passing the array and specifying the key name, you can extract the values of that key separately from the original […]

How to count duplicate values of PHP array
php
April 12, 2026 8 minutes reading time

How to count duplicate values of PHP array

When working with arrays in PHP, you often need to count how many times each value appears. Instead of writing custom loops, PHP provides a built-in function called array_count_values that does this efficiently. In this article, you’ll learn what array_count_values is, how it works, and how to use it in real-world scenarios. The array_count_values function […]