How to Use PHP Include and Require Statements

In the realms of computer science and software engineering, reusability and modularity are considered to be important design principles to keep in mind when building software programs. The key idea behind these principles is to write code in a way that does not concentrate all it’s operations in one place. ... Read more

How to Enable PHP Error Reporting

Errors are undesirable for users and you should do everything in your control to keep users away from them. However, they are of utmost importance for developers. They allow developers to understand the inaccuracies and vulnerabilities in their code by alerting them when their code breaks. They also provide relevant ... Read more

How to Convert a String to a Number in PHP

PHP is a weakly typed language. This means that when initializing a variable in PHP, one doesn’t need to declare the variable type. PHP implicitly declares a data type for your variable. This can save you from prospective type errors in your code. When working with programming languages, it is ... Read more

PHP Memory Leaks, How to Find and Fix Them

Memory leaks can happen in any language, including PHP. These memory leaks may happen in small increments that take time to accumulate, or in larger jumps that manifest quickly. Either way, if your app has a memory leak, sooner or later it will cause problems. The source of and solution ... Read more

PHP Control Flow: Loop Types and Conditional Statements Explained

Each programming language constitutes a basic set of rules that define the flow of control in a program based on certain conditions. They specify the sequence and order of execution of instructions in your code. These control structures lie at the core of programming paradigms and are usually the first ... Read more

PHP Json_encode: Serialize PHP Objects to JSON

PHP’s JSON_Encode Function: Convert PHP to JSON PHP is a server-side scripting language for creating your website’s backend system that can serve webpages, communicate with databases, and exchange data over the internet. A decent backend framework like PHP needs to be capable of providing and processing data in any format ... Read more

Tutorial: Log to Console in PHP

“All code and no logging makes John a black box error-prone system.” Logging is a key aspect of monitoring, troubleshooting and debugging your code. Not only does it make your project’s underlying execution more transparent and intelligible, but also more accessible in it’s approach. In a company or a community ... Read more

Programmatically Adding Laravel Middleware

When it comes to web development, middleware is often the key to ensuring everything connects up - even if some of the pieces don’t always matchup. HTTP Middleware is a mechanism used to conveniently filter HTTP requests coming into your web application. When it comes to PHP, frameworks often help ... Read more

Scout APM for PHP exits Beta

We are excited to announce the General Availability release of our PHP APM agent. You can now monitor your Laravel applications out of the box, and support for more PHP frameworks is in the works! Read more

PHP Advanced Exceptions Tutorial

Software systems inevitably encounter situations that can cause failures and malfunctions which affect user experience, data integrity, and security. In this blog post, we will learn how to avoid these situations though Exception handling . We will focus on software exceptions and how to address them using PHP. Read more

Start your free 14-day trial today.
No credit card needed.