Learn how to use PHP's fseek() function to move file pointers, understand its parameters—including offset and whence options like SEEK_SET, SEEK_CUR, and SEEK_END—and see a complete example that demonstrates reading, writing, and repositioning within a file.
This guide shows how to use PHP's mysqli_num_rows function to retrieve the number of rows returned by a MySQL query, including a complete example that connects to the database, runs a SELECT statement, checks for errors, obtains the row count, and closes the connection.
This article explains how PHP's rawurldecode() function decodes URL‑encoded strings, shows its syntax, provides a complete code example, highlights differences from urldecode(), and offers guidance for proper URL handling in web development.
This guide walks you through setting up a Laravel project, installing the Pusher PHP SDK, configuring environment credentials, creating broadcast events, and using Laravel Echo on the client side to deliver instant notifications, plus tips for advanced customization and testing.
This guide presents a comprehensive PHP naming convention handbook, covering universal principles, variable and function styles, class/interface naming, constant rules, pitfalls to avoid, and the PSR standards, offering practical code examples to help developers write clearer, more maintainable backend code.
This article explains what static methods are in PHP, shows how to define them, and examines their advantages such as simplicity and resource savings alongside drawbacks like testing difficulty and reduced maintainability, helping developers decide when to apply them.
The proposal introduces a unified poll API for PHP that replaces the limited stream_select() function with a flexible, platform‑aware interface supporting epoll, kqueue, WSAPoll and other backends, enabling high‑performance, scalable I/O handling for servers and event‑driven applications.
The PHP Foundation, backed by the Sovereign Tech Agency, outlines a multi‑year plan to modernise PHP’s stream subsystem with performance boosts, safer async I/O, enhanced error handling, new network polling, and TLS 1.3 security improvements, illustrated by before‑and‑after code examples.
This guide explains how to integrate the lightweight, asynchronous Pawl library into PHP projects to create efficient WebSocket clients, covering installation, core components, example code, and advanced configuration for real‑time data streams.
This article reviews the evolution of PHP from its early, clunky versions to the modern, high‑performance, type‑safe language, highlighting traits, short array syntax, variadic functions, generators, arrow functions, null‑coalescing, named arguments, match statements, enums, readonly properties, and constructor property promotion with concrete code examples.
This article explains how the Rector tool can automatically refactor and upgrade legacy PHP code—from installation and configuration to real‑world migration scenarios and CI/CD integration—helping developers modernize projects with minimal manual effort.
This article explains how to build a highly scalable PHP backend by employing modular design, runtime dynamic loading, event‑driven architecture, and various caching and optimization techniques, illustrated with clear code examples.
This guide explains how PHP’s implode() function joins array elements into strings, covering its syntax, basic and advanced usage with separators, handling of nested arrays, and the special case of omitting the glue parameter, illustrated with clear code examples.
This article explains how PHP’s built‑in empty() function determines whether a variable is considered empty, lists the specific cases it treats as empty, provides practical code examples, and offers guidance on proper usage versus isset() for form validation and logical checks.
Learn how to define, pass, loop through, and return arrays within PHP functions, with clear examples of using array(), for and foreach loops, and return statements to build efficient and robust backend code.
Learn practical techniques to monitor OPcache, adjust PHP‑FPM settings, reset caches, employ preload, and use shared memory caching, enabling you to identify and mitigate PHP performance degradation in production without restarting services, ensuring continuous user experience.
This article explains the PHP getcwd() function for obtaining the absolute path of the current working directory, demonstrates two code examples—including changing directories with chdir()—and highlights important considerations such as server‑side paths and handling false returns.
This guide walks you through installing the Think‑worker extension, setting up GatewayWorker, configuring the server, and creating a simple WebSocket client with HTML and JavaScript to demonstrate real‑time communication using the ThinkPHP framework.
This article explores PHP's dynamic function invocation techniques, covering variable functions, the call_user_func and call_user_func_array utilities, with syntax explanations, code examples, practical use cases such as event-driven programming and plugin systems, and best‑practice guidelines to ensure safety and maintainability.
Learn how to establish, use, and close MySQL database connections in PHP with detailed MySQLi and PDO examples, covering object‑oriented syntax, prepared statements, error handling, and best practices for secure and efficient backend development.
An open‑source, instant‑interaction chatroom called “Tadpole” is built with PHP’s Workerman framework and HTML5, leveraging WebSocket for real‑time communication; the guide outlines its key features, installation steps for Linux and Windows, and usage examples for developers to extend the game.
Learn how to accelerate PHP database operations by employing persistent connections, implementing a connection pool, and caching query results, with clear code examples for mysqli, PDO, and Memcached that illustrate each optimization technique and its impact on reducing latency and resource usage.
This guide walks you through a systematic Laravel performance optimization process—from diagnosing bottlenecks with Debugbar and logs, through database query tuning, caching strategies, code-level refinements, to server‑level tweaks—ensuring faster response times for growing PHP applications.
Learn how to use PHP's fileperms() function to obtain file permission data, interpret the returned integer with bitwise operations, and format it into a readable string using a helper function, complete with practical code examples and detailed explanations.
TrueAsync is a PHP async extension that, together with Docker Compose, PHP‑FPM and Nginx, lets developers write coroutine‑based asynchronous code, provides ready‑made demos, and offers a lightweight, Docker‑first stack for building high‑throughput web services.
This article explains how the Ecotone framework lets PHP developers map classes to database tables, hide low‑level SQL behind repository interfaces, customize parameter conversion with converters and expression language, and efficiently query, update, and stream large result sets while keeping business logic clean.
Learn how to use PHP’s powerful glob() function to locate files and directories with pattern matching, explore its syntax, optional flags, and practical examples ranging from simple file listings to recursive directory searches and directory-only queries.
Learn how to automatically extract data from completed PDF forms and generate pre‑filled HTML forms using PHP, with step‑by‑step guidance on installing pdftk, leveraging php‑pdftk or smalot/pdfparser libraries, handling field mapping, security, and best practices for seamless integration.
This article provides a comprehensive guide to PHP's header() function, covering its syntax, parameters, and practical code examples for page redirection, setting HTTP response headers, status codes, cache control, and file downloads, helping developers use it effectively.
Learn how PHP’s built-in array_unique() function efficiently removes duplicate values from arrays, with detailed syntax, practical code examples, and real-world scenarios such as data cleaning, user input validation, and data aggregation to improve code readability and performance.
GLPI is an open‑source IT asset management system; this guide explains its latest 11.0.1 release, outlines required web server, database, PHP extensions, hardware specs, and provides a complete Docker‑compose configuration with environment file and startup commands for quick deployment.
This guide introduces the PHP AsyncIO extension built on PHP Fiber and Workerman, explains its high‑performance features, shows how to install and quickly start with code examples for basic, concurrent, timeout‑controlled, and managed tasks, and provides a complete API reference and advanced usage tips.
PHP 8.5, slated for release on November 20 2025, introduces a pipe operator, native array_first() and array_last() functions, a standards‑compliant URI extension, closure self‑reference retrieval, fatal error backtraces, and INI diff options, with code examples and a detailed release schedule.
Symfony 7.4 deprecates XML configuration, enhances YAML with JSON‑Schema auto‑completion, and introduces PHP “array shapes” for more readable, type‑safe config files, guiding developers toward modern, IDE‑friendly configuration practices while phasing out legacy XML support.
This article showcases seven practical PHP 8.5 pipeline operator examples—from cleaning user input and processing CSV rows to building HTTP responses, preparing search queries, calculating cart totals, enriching logs, and creating image thumbnails—demonstrating how the operator makes code more readable and functional.
This article explains PHP's is_object function, its syntax, and provides clear code examples showing how to check whether a variable is an object or not, helping developers avoid type‑related errors in their backend code.
This article examines how AI, especially large language models and code‑generation tools, is reshaping web development, argues that PHP and Laravel remain vital, and outlines how developers can integrate AI to boost productivity, evolve their roles, and drive a more creative future.
Learn how PHP’s array_values() function returns a new array with sequential numeric keys, reindexes indexed arrays, converts associative arrays to indexed ones, and operates without affecting the original array, illustrated with clear code examples and practical use cases.
This article explains how PHP's is_numeric() function determines whether a variable is numeric, demonstrates practical code examples for variables and form inputs, and highlights special cases developers should watch out for when validating numeric data.
This article explains how to apply a series of inline optimization strategies—static typing, function inlining, efficient array and string handling, loop refinements, and Opcache preloading—to dramatically improve PHP execution speed and bring its performance close to that of compiled C code.
This tutorial explains how to install Xunsearch, integrate it with PHP, and index song data to dramatically improve search performance on a music website, providing step‑by‑step code examples and best practices for building an efficient full‑text search solution.
Learn step-by-step how to design a MySQL categories table, retrieve data with PHP, construct a recursive tree based on parent_id, and render the hierarchical structure as an HTML list, providing a complete solution for managing nested product categories in e‑commerce applications.
This article explains PHP's is_int() function, its syntax, return values, and provides two practical code examples demonstrating how to check whether variables are integers, helping developers handle type checking efficiently.
The Asyncio‑Gamekit library provides a Workerman‑based asynchronous game framework for PHP, offering room lifecycle management, player communication, broadcasting, timers, load balancing, persistence, logging, and testing, enabling developers to quickly build WebSocket‑driven multiplayer games such as card, board, and real‑time battle titles.
Amid the AI surge, traditional PHP frameworks must shift from developer‑centric flexibility to AI‑friendly determinism, emphasizing clear interface contracts, predictable directory structures, immutable lifecycles, and simple dependency injection, enabling AI agents to reliably generate code from PRDs and fostering stable, scalable AI‑first architectures.
This guide explains PHP’s chdir() function, covering its syntax, parameters, return values, practical usage examples, and important considerations for safely changing the current working directory in scripts, including how to verify directory accessibility and how getcwd() can be used to confirm the change.
Despite the hype around Node.js, PHP continues to power the majority of web servers thanks to its ultra‑simple deployment, deep LAMP integration, massive CMS ecosystem, mature frameworks, performance gains in PHP 8, and a robust community that together form a lasting moat.
Learn how PHP’s built‑in strlen function works to return the byte length of a string, see a clear example with code, understand its output, and discover important considerations about character encoding and multibyte strings to ensure accurate length calculations.
This article explains how to use PHP's strtr() function for various string replacement scenarios, including simple character swaps, multiple replacements with associative arrays, sequence replacements, and partial removals, providing clear code examples for each use case.
Learn how PHP’s glob() function can retrieve file paths using patterns, understand its syntax, parameters, and flags, and explore practical code examples for matching all files, specific extensions, brace expansions, and recursive directories, while noting important considerations and limitations.
This article explains PHP's is_dir() function, shows how to use it for simple directory checks and for traversing folder structures, provides complete code examples, and highlights important considerations such as path existence and permissions.
This guide explains how to use the Ratchet PHP library to create an asynchronous WebSocket server, covering WebSocket fundamentals, the handshake protocol, required HTTP headers, Composer installation, full server‑side code, a simple HTML/JavaScript client, and visual demo screenshots.
Docker‑PHP v4.0.0‑beta1 introduces hardened FrankenPHP images, upgraded Laravel automation, a slew of fine‑grained environment variables, and numerous quality‑of‑life and bug‑fix improvements that make containerized PHP deployments smoother, more secure, and ready for production‑grade Kubernetes workloads.
This tutorial walks you through establishing MySQL connections in PHP using both the mysqli extension and PDO, covering procedural and object‑oriented code, prepared statements, error handling, and proper connection closure for robust backend development.
Learn how to use PHP’s file_exists function to verify the existence of local and remote files, understand its syntax and return values, see practical code examples, and grasp important considerations such as correct paths and permission requirements.
TrueAsync brings true asynchronous capabilities to PHP by leveraging Fibers and an event‑loop, enabling thousands of concurrent I/O operations in a single thread, dramatically improving performance, reducing resource usage, and opening new possibilities for high‑performance APIs, real‑time apps, and microservices.
This guide explains how to use PHP’s fgetc() function to read single characters from files and user input, covering file opening with fopen(), reading loops, handling end-of-file, and practical code examples for both file and STDIN scenarios.
This guide explains PHP 8's match expression, highlighting its strict comparison, return capabilities, and practical examples—including basic rewrites, conditional branches, enum integration, and a driver factory pattern—to help developers replace switch statements with more robust code.
This guide explains how to install, configure, and run the Webman MCP plugin—covering features, command‑line tools, component creation, and deployment steps—to rapidly set up a Model Context Protocol server using PHP.
This 2025 guide reviews five essential PHP interface optimization tools—LiveWire, Assetic/Assetter, Tailwind CSS, PHP DebugBar, and WordPress + Elementor—explaining their features, performance benefits, integration steps, and best‑practice recommendations to accelerate development, improve user experience, and meet modern web performance metrics.
Learn how PHP’s is_numeric() function checks whether a variable is numeric, see detailed explanations, multiple code snippets for direct values and form inputs, and understand special cases like decimal points and signs to reliably validate numbers in your applications.
Learn how to use PHP's curl_setopt function to configure HTTP requests, covering its syntax, parameter explanations, return values, and a complete example that demonstrates initializing a cURL session, setting options like URL, GET method, timeout, handling responses, and closing the session.
This step‑by‑step guide shows how to integrate Pusher into a Laravel application, covering prerequisites, project setup, package installation, environment configuration, event creation, client‑side listening with Laravel Echo, testing, and advanced customization for real‑time notifications.
The article introduces the Yii2 extension FrankenPHP 0.1.0, explains its core integration, highlights new features and documentation upgrades, and provides step‑by‑step installation, configuration, server startup, and testing instructions for modern, high‑performance Yii2 deployments.
Phel is a Lisp‑inspired functional programming language for PHP that integrates seamlessly with the PHP ecosystem, offering immutable data structures, a macro system, an interactive REPL, and concise syntax, while providing step‑by‑step installation via Docker or Composer.
Learn step‑by‑step how to set up Docker and Docker Compose on Linux, macOS, and Windows, install optional Composer, initialize a Webman project, and use the built‑in docker‑compose.yml to perform one‑click development or production deployments, including custom service configuration and troubleshooting tips.
Craft CMS announced its migration to Laravel V6, outlining a minimal‑impact transition, a new Yii 2 adapter for compatibility, and six major features—including bulk publishing, scheduled drafts, content import, approval workflows, page comments, activity logs, and a dark‑mode UI—set for a 2026 release.
This guide introduces a lightweight, high‑performance PHP queue library built on Redis 5.0+ Streams, detailing its features such as high concurrency, delayed tasks, multi‑producer/consumer support, ACK handling, message replay, audit mode, and provides step‑by‑step installation, configuration, and usage examples with code snippets.
This article explains how PHP's built‑in ord() function returns the ASCII code of a string's first character, details its syntax and parameters, shows multiple usage examples—including loops and handling of multibyte characters—and highlights important limitations and alternatives.
This guide introduces PHP’s strrev() function, covering its syntax, parameters, return value, and multiple practical examples—from basic string reversal to handling numbers, special characters, and multi-line text—while also highlighting common use cases such as palindrome checks and simple data obfuscation.
Traditional PHP memory profilers, designed for synchronous blocking execution, struggle in high‑concurrency async frameworks like Swoole or ReactPHP because execution contexts intermix, memory leaks become ambiguous, and profiling overhead distorts performance, requiring specialized tools, snapshot comparisons, and disciplined coding practices to effectively diagnose issues.
Learn how PHP’s powerful strtotime() function transforms human‑readable date strings into UNIX timestamps, covering its syntax, common formats—including relative dates, absolute dates, time intervals, and special keywords—plus usage tips, limitations, and advanced parameters for flexible date handling.
PHP‑ORT is a high‑performance PHP extension that brings SIMD‑accelerated tensor operations and optional ONNX Runtime integration to PHP, offering multi‑core parallelism, extensive type support, and memory‑efficient processing for machine‑learning, scientific, and data‑intensive applications.
Sylius 2.1.6, the open‑source PHP e‑commerce framework built on Symfony, introduces a series of refactors, bug fixes, CI improvements, and deprecations that enhance product management, shipping, payment integration, and overall platform stability.
This tutorial walks you through creating a basic PHP MVC framework, covering the MVC pattern concepts, required prerequisites, project setup with Composer, directory structure, core components like routing and controllers, view rendering, model creation, and testing the application.
This tutorial walks you through creating a lightweight PHP router—from understanding routing fundamentals and setting up project structure to writing the core Router class, configuring URL rewriting, defining routes with parameters, testing, and exploring extensions—empowering you to grasp framework internals and handle HTTP requests without a full‑stack framework.
This article explains how PHP's extract() function transforms array key‑value pairs into variables, details the syntax, flag options, prefix usage, provides practical examples, and highlights important precautions to avoid naming conflicts and security issues.
This guide explains PHP’s addcslashes() function, its syntax, parameter details, practical examples for escaping specific characters, and tips on when to use addslashes() instead, helping developers handle string escaping reliably in their applications.
PHP em is a WebAssembly‑based, single‑page PHP development stack that lets you write, test, and run PHP code directly in the browser or as a desktop app, offering an integrated IDE, virtual file system, multi‑version support, database extensions, and GitHub integration.
Learn how to use PHP's GD library (and optionally ImageMagick) to efficiently resize, proportionally scale, crop, and compress images—including avatar handling—by following detailed code examples, best practices for memory management, error handling, and performance optimization to improve web application speed and user experience.
This article explains PHP’s is_callable() function, its parameters, and provides clear code examples showing how to verify both standalone functions and class methods before invoking them, helping developers write more robust and maintainable backend code.
Learn how to use PHP’s str_replace function to replace or delete characters in strings, with clear syntax explanations and practical examples covering simple replacements, multiple replacements using arrays, and character removal, plus tips on advanced options.
This article explains how PHP can handle high‑concurrency tasks by encapsulating functionality into independent units, demonstrating practical examples of multi‑process, multi‑thread, and coroutine approaches using the pcntl, pthread, and Swoole extensions to boost performance and resource management.
This article explains the PHP addcslashes() function, its syntax, parameters, and practical examples for escaping specific characters—including letters, quotes, and backslashes—while also highlighting differences from addslashes() and providing clear code demonstrations.
This article explains the concept of Bring Your Own HTTP Client in PHP, outlines the relevant PSR-7, PSR-17, and PSR-18 standards, shows how php-http/discovery simplifies client selection, and provides concrete SDK code and usage examples for flexible, high‑performance HTTP integration.
This guide explains how Laradock provides a ready‑to‑use Docker‑based PHP development environment, covering its configurable .env file, seamless PHP version switching, Chinese mirror acceleration, custom container builds, and step‑by‑step commands to launch services like NGINX, MySQL, Redis, and Composer.
This article explains PHP’s is_callable() function, detailing its purpose, parameter options, and practical usage through clear code examples that demonstrate checking both standalone functions and class methods before invocation to improve code robustness.
Swoole coroutine leaks are stealthy issues that gradually consume CPU and memory, caused by improper loops, global state pollution, inconsistent environments, and limited debugging tools, but can be mitigated with proper context management, lifecycle control, environment consistency, and proactive monitoring.
Learn essential PHP object‑oriented programming techniques, including grouping data and behavior into classes, using access modifiers, initializing objects with constructors, chaining methods, and applying the strategy pattern, to boost code readability, maintainability, and flexibility.
This article explains PHP’s fread() function, its syntax, parameters, return values, and provides a complete example showing how to open a file, read its contents, output them, and properly close the handle, including optional offset usage.
This article explains PHP’s is_numeric() function, showing how it determines whether variables are numeric, provides clear code examples for direct usage and form input validation, and highlights special cases developers should watch out for when validating numbers.
Version 0.4.0 of the TrueAsync PHP library introduces major performance and memory‑management enhancements, adds asynchronous UDP socket support and SSL for socket streams, fixes numerous bugs, and outlines new requirements and breaking API changes for developers.
This tutorial walks you through registering a Baidu developer account, creating a PHP script, building a simple front‑end page, fetching nearby points of interest via the Baidu Maps API, and using Ajax to display the results on a map for enhanced navigation.
This article examines how Laravel’s mature ecosystem, modular architecture, built‑in features, and vibrant community make it the leading PHP framework for secondary development, compares it with other frameworks, and outlines emerging trends such as serverless deployment, AI‑assisted coding, and containerization.
Learn how to use PHP’s mysqli_query function to connect to MySQL, execute SELECT queries, handle results, and perform INSERT, UPDATE, and DELETE operations, with a complete code example and best‑practice tips for managing database connections and error handling.
PHP 8.5, slated for release at the end of 2025, introduces a powerful pipeline operator, new array_first/array_last functions, static closures in const contexts, and other enhancements that boost code readability, safety, and performance, while reaffirming PHP’s continued growth and relevance in web development.
This article explains the purpose of URL encoding, introduces PHP's urldecode() function, shows its prototype and practical examples, and highlights its limitations and the alternative rawurldecode() for handling special characters.
This guide introduces PHP’s array_chunk() function, detailing its syntax, parameters, and how to split large arrays into smaller chunks—with and without preserving keys—through clear code examples and output explanations, helping developers efficiently manage array data in backend projects.