Tagged articles

PHP

3032 articles · Page 16 of 31
Open Source Tech Hub
Open Source Tech Hub
Feb 8, 2024 · Backend Development

What Is Workerman and How to Use Its Connection Class in PHP

Workerman is an open‑source, high‑performance PHP application container that provides a low‑level service framework for building TCP/UDP, WebSocket, HTTP, and custom protocol servers, and this guide explains its core concepts, the Worker and Connection classes, and a simple usage example with code.

Async IOPHPnetwork programming
0 likes · 4 min read
What Is Workerman and How to Use Its Connection Class in PHP
php Courses
php Courses
Feb 8, 2024 · Backend Development

Implementing a Membership Level System in a PHP E‑commerce Platform

This article explains how to design and implement a PHP-based membership level system for e‑commerce sites, covering strategy selection, database schema, calculation rules, benefits management, front‑end display, and data‑driven analysis to improve customer loyalty and operational effectiveness.

E‑commercePHPbackend development
0 likes · 6 min read
Implementing a Membership Level System in a PHP E‑commerce Platform
php Courses
php Courses
Feb 8, 2024 · Backend Development

Using PHP trim() Function to Remove Whitespace and Specified Characters

This article explains PHP's trim() function, its syntax and parameters, and provides clear code examples showing how to remove surrounding whitespace or custom characters from strings, while also mentioning related ltrim() and rtrim() functions for one‑sided trimming.

PHPString Manipulationltrim
0 likes · 4 min read
Using PHP trim() Function to Remove Whitespace and Specified Characters
Open Source Tech Hub
Open Source Tech Hub
Feb 8, 2024 · Backend Development

What Is Workerman and How to Build a Simple PHP Server with It

Workerman is an open‑source, pure‑PHP high‑performance application container that acts like a PHP‑based Nginx, enabling developers to create TCP/UDP, WebSocket, HTTP services and even custom servers such as Redis or FTP, with multi‑process, epoll and non‑blocking I/O support.

NetworkingPHPbackend development
0 likes · 3 min read
What Is Workerman and How to Build a Simple PHP Server with It
Open Source Tech Hub
Open Source Tech Hub
Feb 7, 2024 · Backend Development

How to Use SonarLint for Real‑Time PHP Code Quality Checks

This guide explains how to install SonarLint in IDEs like PHPStorm, run on‑the‑fly scans, interpret common PHP code‑smell warnings, and apply concrete fixes for issues such as missing braces, improper loop conditions, unreachable catch blocks, and absent default cases in switch statements.

IDE pluginPHPStatic Analysis
0 likes · 5 min read
How to Use SonarLint for Real‑Time PHP Code Quality Checks
php Courses
php Courses
Feb 7, 2024 · Backend Development

Using PHP usort() Function to Sort Arrays with Custom Comparison Functions

This article explains the PHP usort() function, its syntax, how to write custom comparison callbacks, and provides practical examples for sorting numeric arrays, associative arrays of objects, and handling important considerations such as return values, mutability, and stability.

PHParray sortingcomparison-function
0 likes · 5 min read
Using PHP usort() Function to Sort Arrays with Custom Comparison Functions
php Courses
php Courses
Feb 7, 2024 · Backend Development

Building a Simple File Sharing Application with PHP and JavaScript

This guide walks you through creating a simple, secure file sharing web application using PHP and JavaScript, covering environment setup, user authentication, file upload handling, display of uploaded files, deletion, and UI styling with CSS and dynamic enhancements via JavaScript.

JavaScriptPHPWeb Development
0 likes · 5 min read
Building a Simple File Sharing Application with PHP and JavaScript
php Courses
php Courses
Feb 6, 2024 · Backend Development

Implementing Logistics Tracking in a PHP E‑Commerce Application

To enhance user trust and satisfaction in an e‑commerce platform, this guide outlines a step‑by‑step PHP implementation of logistics tracking, covering collection of shipment data, integration with tracking APIs, parsing responses, storing results, displaying updates to customers, and maintaining real‑time information.

API IntegrationE‑commerceLogistics Tracking
0 likes · 5 min read
Implementing Logistics Tracking in a PHP E‑Commerce Application
php Courses
php Courses
Feb 6, 2024 · Backend Development

Method‑Based Model Casting in Laravel 11

Laravel 11 introduces a method‑based model casting system that replaces the traditional $casts property, allowing developers to define type conversions via Attribute methods, which improves code clarity, flexibility, testability, and overall maintainability of Eloquent models.

EloquentLaravel 11Model Casting
0 likes · 7 min read
Method‑Based Model Casting in Laravel 11
php Courses
php Courses
Feb 6, 2024 · Backend Development

Why Build a Custom PHP Framework – Course Outline

This article explains the motivations for creating a custom PHP framework—such as meeting specific needs, learning, long‑term maintenance, performance, usability, and security—and provides a detailed course outline covering MVC, routing, error handling, namespaces, design patterns, configuration, and database operations.

Design PatternsMVCPHP
0 likes · 4 min read
Why Build a Custom PHP Framework – Course Outline
php Courses
php Courses
Feb 6, 2024 · Backend Development

How to Use PHP’s array_multisort() Function to Sort Multiple Arrays

This article explains the PHP array_multisort() function, detailing its syntax, parameter options, and a step‑by‑step example that sorts name, age, and score arrays, followed by the resulting output and a concise summary of its practical usage.

Code ExamplePHParray_multisort
0 likes · 4 min read
How to Use PHP’s array_multisort() Function to Sort Multiple Arrays
php Courses
php Courses
Feb 5, 2024 · Databases

How to Properly Close MySQL Connection Pools in PHP

This article explains the concept of MySQL connection pools in PHP, demonstrates how to create, use, and correctly close both individual connections and pooled connections using mysqli functions and a custom pool class, and highlights the importance of releasing resources to maintain application performance.

DatabaseMySQLPHP
0 likes · 5 min read
How to Properly Close MySQL Connection Pools in PHP
php Courses
php Courses
Feb 5, 2024 · Backend Development

How to Use PHP's array_fill() Function to Fill Arrays

This article explains the PHP array_fill() function, its signature, parameter meanings, return value, practical code examples for numeric and alphabetic keys, and important usage considerations for efficiently populating arrays without manual loops.

ArrayPHParray fill
0 likes · 5 min read
How to Use PHP's array_fill() Function to Fill Arrays
Open Source Tech Hub
Open Source Tech Hub
Feb 4, 2024 · Backend Development

How to Build a Secure SQL Query Tool for Private Deployments

This article explains why a SQL query tool is essential for on‑premise systems, describes the challenges of remote access and data safety, and provides a step‑by‑step implementation covering frontend encryption, backend whitelist checks, decryption, and query execution with code examples.

EncryptionJavaScriptPHP
0 likes · 8 min read
How to Build a Secure SQL Query Tool for Private Deployments
php Courses
php Courses
Feb 4, 2024 · Backend Development

Implementing Product Promotion Push Functionality in a PHP E‑commerce Site

This article outlines the step‑by‑step process for implementing a product promotion push feature in a PHP‑based e‑commerce platform, covering target user identification, promotion table design, message templating, script development, database queries, cron scheduling, and result monitoring to boost user engagement and sales.

CronDatabaseE‑commerce
0 likes · 5 min read
Implementing Product Promotion Push Functionality in a PHP E‑commerce Site
php Courses
php Courses
Feb 4, 2024 · Backend Development

Using PHP glob() Function to Find Files and Directories

This article explains the PHP glob() function, its syntax and optional flags, and provides four practical examples demonstrating how to locate PHP files, multiple file types, files using wildcards, and directories, while highlighting performance considerations.

File SearchPHPglob
0 likes · 5 min read
Using PHP glob() Function to Find Files and Directories
php Courses
php Courses
Feb 4, 2024 · Backend Development

Top PHP Frameworks for Web Development Companies: A Comprehensive Guide

This guide examines why PHP web development companies rely on frameworks, outlines key benefits such as code reuse, rapid development, security, maintainability, scalability, risk reduction, and community support, and reviews ten leading PHP frameworks—including Laravel, Symfony, and CodeIgniter—to help choose the best fit for projects.

CodeIgniterPHPWeb Development
0 likes · 9 min read
Top PHP Frameworks for Web Development Companies: A Comprehensive Guide
php Courses
php Courses
Feb 2, 2024 · Backend Development

Comprehensive Laravel Guide: Best Practices, Controllers, Eloquent ORM, Queues, Security, and Performance Optimization

This guide provides a thorough overview of Laravel development, covering MVC fundamentals, proper use of controllers, services, repositories, request validation, traits, Eloquent ORM operations, queue handling for emails, security measures, CSRF protection, performance tuning, and recommended learning resources, all illustrated with practical code examples.

EloquentPHPPerformance
0 likes · 16 min read
Comprehensive Laravel Guide: Best Practices, Controllers, Eloquent ORM, Queues, Security, and Performance Optimization
php Courses
php Courses
Feb 2, 2024 · Backend Development

Optimizing Exception Handling in PHP

This article explains how PHP developers can improve code stability and maintainability by using try‑catch blocks, creating custom exception classes, employing multiple catch clauses, adding finally blocks, and leveraging throw and set_exception_handler for comprehensive exception management.

Coding PracticesPHPbackend
0 likes · 4 min read
Optimizing Exception Handling in PHP
php Courses
php Courses
Feb 1, 2024 · Backend Development

How to Use PHP's file_get_contents() to Read Files and URLs

This article explains the PHP file_get_contents() function, covering its syntax, parameters, return values, practical examples for reading local files and remote URLs, common pitfalls, and best practices for reliable file handling in backend development.

PHPfile_get_contentsweb programming
0 likes · 4 min read
How to Use PHP's file_get_contents() to Read Files and URLs
php Courses
php Courses
Feb 1, 2024 · Backend Development

Implementing Product Promotion Push Functionality in a PHP E‑commerce Site

This article outlines a step‑by‑step guide for building a PHP‑based product promotion push system for e‑commerce platforms, covering recipient identification, database schema design, message templating, script development, scheduling with crontab, and result monitoring to boost user engagement and sales.

CronDatabaseE‑commerce
0 likes · 4 min read
Implementing Product Promotion Push Functionality in a PHP E‑commerce Site
php Courses
php Courses
Jan 31, 2024 · Information Security

How to Defend Against CSRF Attacks in PHP

This article explains the principles of CSRF attacks and provides practical PHP techniques to prevent them, including token generation and verification, checking Referer and Origin headers, configuring secure cookie attributes, and ensuring safe login and logout processes.

CSRFOriginPHP
0 likes · 5 min read
How to Defend Against CSRF Attacks in PHP
php Courses
php Courses
Jan 31, 2024 · Backend Development

Understanding and Implementing Laravel Scopes for Eloquent Models

Laravel Scopes provide a powerful mechanism to define reusable query constraints for Eloquent models, covering global, local, anonymous, and dynamic scopes, with step‑by‑step instructions on creation, application, removal, and best practices, enhancing code reuse, readability, and maintainability in backend development.

EloquentPHPScopes
0 likes · 13 min read
Understanding and Implementing Laravel Scopes for Eloquent Models
Open Source Tech Hub
Open Source Tech Hub
Jan 31, 2024 · Artificial Intelligence

How to Build Async OpenAI PHP Clients with Workerman & Webman

This guide shows how to install the OpenAI PHP async client and implement streaming and non‑streaming chat, image generation, audio speech, and embedding features using Workerman and Webman, including Azure OpenAI support, with complete code examples.

APIOpenAIPHP
0 likes · 6 min read
How to Build Async OpenAI PHP Clients with Workerman & Webman
php Courses
php Courses
Jan 30, 2024 · Backend Development

Understanding PHP 7.3 array_key_first() Function: Syntax, Usage, and Examples

PHP 7.3 introduces the array_key_first() function, which returns the first key of an array or null if empty; this article explains its syntax, provides code examples for retrieving the first key and checking for empty arrays, and highlights usage considerations and potential pitfalls.

ArraysPHParray_key_first
0 likes · 3 min read
Understanding PHP 7.3 array_key_first() Function: Syntax, Usage, and Examples
php Courses
php Courses
Jan 30, 2024 · Information Security

Using PHP to Secure Data Transmission with HTTPS, Symmetric and Asymmetric Encryption

This article explains how to protect data transmission in PHP applications by employing HTTPS (SSL/TLS), implementing symmetric encryption such as AES, and using asymmetric encryption with OpenSSL, while highlighting key management practices to ensure confidentiality, integrity, and resistance to man‑in‑the‑middle attacks.

EncryptionHTTPSOpenSSL
0 likes · 4 min read
Using PHP to Secure Data Transmission with HTTPS, Symmetric and Asymmetric Encryption
php Courses
php Courses
Jan 30, 2024 · Backend Development

PHP array_fill() Function: Usage, Parameters, Return Values, and Examples

This article explains PHP's array_fill() function, detailing its purpose, parameters, return values, and provides simple and multi‑dimensional examples illustrating how to create and populate arrays with a single value, including edge cases such as negative indices and zero length.

PHParray fillbackend
0 likes · 5 min read
PHP array_fill() Function: Usage, Parameters, Return Values, and Examples
php Courses
php Courses
Jan 30, 2024 · Backend Development

Guide to Configuring a PHP gRPC Client with Docker and Composer

This tutorial provides a step‑by‑step guide to configuring a PHP gRPC client using proto files, Composer, Docker, and Docker‑Compose, covering project structure, code generation, autoload setup, Dockerfile creation, and client execution in a containerized environment.

PHPbackendcomposer
0 likes · 9 min read
Guide to Configuring a PHP gRPC Client with Docker and Composer
php Courses
php Courses
Jan 29, 2024 · Backend Development

How to Use PHP shuffle() to Randomly Sort Arrays and Generate Random Numbers

This article explains the PHP shuffle() function, demonstrates how to create arrays, use shuffle() to randomize their elements, display the results, and shows additional uses such as generating random numbers with range() and shuffle(), providing clear code examples throughout.

ArraysPHPShuffle
0 likes · 4 min read
How to Use PHP shuffle() to Randomly Sort Arrays and Generate Random Numbers
php Courses
php Courses
Jan 29, 2024 · Backend Development

Practical Laravel API Development Course Overview

This ten‑day hands‑on course teaches the full lifecycle of building RESTful APIs with the Laravel framework, covering design, routing, request/response handling, authentication, data transmission, error handling, and practical exercises to boost development efficiency for beginners and experienced developers alike.

APIPHPRESTful
0 likes · 3 min read
Practical Laravel API Development Course Overview
Architect's Guide
Architect's Guide
Jan 29, 2024 · Databases

Performance Comparison of IN vs JOIN in MySQL Queries

This article experimentally compares the efficiency of using IN clauses versus JOIN operations in MySQL by testing small, medium, and large datasets, measuring query costs, execution times, and highlighting the scalability limits of IN statements.

DatabaseJOINMySQL
0 likes · 8 min read
Performance Comparison of IN vs JOIN in MySQL Queries
Open Source Tech Hub
Open Source Tech Hub
Jan 28, 2024 · Backend Development

What’s New in PHP‑Parser 5.0.0? A Deep Dive into Features and Usage

PHP‑Parser 5.0.0 introduces a host of new classes, methods, and parser improvements—including a PhpVersion class, PHP 8 support, enhanced pretty‑printing, and updated node handling—while also deprecating older APIs; the article provides a detailed changelog and a concise usage example for parsing PHP code.

ASTCode ParsingPHP
0 likes · 9 min read
What’s New in PHP‑Parser 5.0.0? A Deep Dive into Features and Usage
php Courses
php Courses
Jan 27, 2024 · Backend Development

Implementing Member Level Points Redemption in a PHP E‑Commerce Site

This tutorial explains how to create a MySQL members table, configure a PHP database connection, and build backend scripts and a web form that allow e‑commerce users to exchange points for membership level upgrades, complete with full code examples.

E‑commerceMySQLPHP
0 likes · 5 min read
Implementing Member Level Points Redemption in a PHP E‑Commerce Site
php Courses
php Courses
Jan 26, 2024 · Backend Development

Implementing Coupon Activity Rule Management in a PHP E‑Commerce System

This article explains how to design database tables and develop a PHP‑based backend for managing e‑commerce coupon activity rules, covering creation, editing, deletion, and logical controls such as usage limits, with step‑by‑step guidance on forms, POST handling, validation, and database operations.

E‑commercePHPcoupon
0 likes · 4 min read
Implementing Coupon Activity Rule Management in a PHP E‑Commerce System
php Courses
php Courses
Jan 25, 2024 · Frontend Development

Understanding AJAX: Asynchronous JavaScript and XML with PHP Example

This guide explains AJAX as an asynchronous JavaScript and XML technique that enables seamless client‑server communication with PHP, providing step‑by‑step examples and key concepts for building dynamic, responsive web applications.

AJAXAsynchronousJavaScript
0 likes · 3 min read
Understanding AJAX: Asynchronous JavaScript and XML with PHP Example
php Courses
php Courses
Jan 25, 2024 · Backend Development

Understanding and Using PHP's in_array() Function

This article explains PHP's in_array() function, covering its syntax, parameters, strict comparison option, and provides clear code examples demonstrating how to check for values in arrays and interpret the results in typical PHP scripts.

PHParray_searchbackend development
0 likes · 4 min read
Understanding and Using PHP's in_array() Function
php Courses
php Courses
Jan 25, 2024 · Backend Development

How to Use PHP’s filesize() Function to Get File Size

This article explains the PHP filesize() function, its syntax, usage examples, and important considerations such as checking file existence and handling failures, providing developers with a clear guide to retrieve local file sizes in bytes.

PHPbackend developmentfile size
0 likes · 3 min read
How to Use PHP’s filesize() Function to Get File Size
php Courses
php Courses
Jan 24, 2024 · Backend Development

PHP Caching Techniques: Page Cache, Data Cache, and File Cache

This article explains why PHP caching is essential for web performance and details three main techniques—page caching with output buffering, data caching using extensions like Memcached or APCu, and file caching with file I/O functions—plus best practices for updates, expiration, and avoiding cache penetration.

File CacheMemcachedPHP
0 likes · 6 min read
PHP Caching Techniques: Page Cache, Data Cache, and File Cache
php Courses
php Courses
Jan 24, 2024 · Backend Development

Essential Tools for PHP Developers: IDEs, AI Assistants, Debuggers, and Deployment Solutions

This article presents a curated list of essential tools for PHP developers—including IDEs, AI‑powered assistants, database managers, static analysis utilities, code formatters, container platforms, debuggers, testing frameworks, and deployment automation—to streamline workflows, boost productivity, and improve code quality.

DebuggingIDEPHP
0 likes · 8 min read
Essential Tools for PHP Developers: IDEs, AI Assistants, Debuggers, and Deployment Solutions
php Courses
php Courses
Jan 24, 2024 · Backend Development

Using PHP's ceil() Function to Round Numbers Upward

This article explains PHP's ceil() function, its syntax, and provides three practical code examples demonstrating how to round floating‑point and integer values upward to the smallest integer greater than or equal to the given number.

PHPRoundingbackend
0 likes · 4 min read
Using PHP's ceil() Function to Round Numbers Upward
php Courses
php Courses
Jan 23, 2024 · Backend Development

Using PHP file_put_contents() to Write and Append Data to Files

This article explains the PHP file_put_contents() function, covering its syntax, parameters, return values, and provides clear code examples for both overwriting and appending data to files, helping developers efficiently handle file writing tasks in backend applications.

Code ExampleFile HandlingPHP
0 likes · 4 min read
Using PHP file_put_contents() to Write and Append Data to Files
php Courses
php Courses
Jan 23, 2024 · Backend Development

Using Ecotone for Database Mapping, Queries, and Parameter Conversion in PHP

This article explains how Ecotone abstracts database access in PHP by mapping domain objects to tables, hiding low‑level DAO code behind business interfaces, and providing annotations for inserts, updates, custom converters, expression language, pagination, result‑set transformation, and integration with Doctrine ORM and Eloquent models.

EcotoneORMPHP
0 likes · 16 min read
Using Ecotone for Database Mapping, Queries, and Parameter Conversion in PHP
php Courses
php Courses
Jan 23, 2024 · Information Security

Using JWT for Secure Authentication in PHP

This article explains how to install the PHP‑JWT library with Composer, generate JSON Web Tokens using JWT::encode, validate them with JWT::decode, and configure custom expiration and not‑before times to enhance authentication security in PHP applications.

AuthenticationJWTPHP
0 likes · 4 min read
Using JWT for Secure Authentication in PHP
php Courses
php Courses
Jan 22, 2024 · Backend Development

Common Design Patterns in PHP: Singleton, Factory, Observer, and Adapter

This article introduces four essential design patterns—Singleton, Factory, Observer, and Adapter—explaining their concepts and providing complete PHP code examples to demonstrate how each pattern can be implemented to create maintainable, extensible, and flexible applications.

Design PatternsPHPadapter
0 likes · 7 min read
Common Design Patterns in PHP: Singleton, Factory, Observer, and Adapter
php Courses
php Courses
Jan 22, 2024 · Backend Development

Common PHP Code Smells and Refactoring Solutions

This article explains typical PHP code smells such as long methods, large classes, duplicate code, excessive comments, complex conditionals, and infinite loops, and provides concrete refactoring examples to improve readability, maintainability, and overall code quality.

PHPRefactoringbackend
0 likes · 8 min read
Common PHP Code Smells and Refactoring Solutions
php Courses
php Courses
Jan 19, 2024 · Backend Development

Defining Classes and Using Constructor Property Promotion in PHP

This article explains how to define a PHP class with properties and methods, demonstrates traditional class syntax with a Bird example, and shows how PHP 8's constructor property promotion and default values simplify class definitions while improving readability and efficiency.

ClassesConstructor PromotionPHP
0 likes · 4 min read
Defining Classes and Using Constructor Property Promotion in PHP
php Courses
php Courses
Jan 19, 2024 · Backend Development

Using PHP file_put_contents() to Write Data to Files

This article explains the PHP file_put_contents() function, its syntax, parameters, return values, and provides multiple code examples for writing strings, appending data, and handling arrays or callbacks to efficiently write content to files without manual opening and closing.

File HandlingPHPbackend development
0 likes · 4 min read
Using PHP file_put_contents() to Write Data to Files
php Courses
php Courses
Jan 19, 2024 · Databases

Redis Basics and Using Redis to Optimize PHP Web Applications

This article introduces Redis fundamentals and demonstrates how to integrate Redis into PHP web applications for caching, session management, database caching, and queue operations, providing code examples that illustrate connecting to Redis, setting and retrieving data, and configuring expiration to boost performance and stability.

In-Memory DatabasePHPQueue
0 likes · 4 min read
Redis Basics and Using Redis to Optimize PHP Web Applications
Open Source Tech Hub
Open Source Tech Hub
Jan 18, 2024 · Backend Development

Install and Use FFmpeg with PHP‑FFMpeg on Ubuntu

This guide explains what FFmpeg is, shows how to install it on Ubuntu 18.04, demonstrates integrating the Webman framework and PHP‑FFMpeg library, and provides step‑by‑step code examples for extracting images, adding watermarks, and basic video editing.

PHPUbuntuWebman
0 likes · 6 min read
Install and Use FFmpeg with PHP‑FFMpeg on Ubuntu
php Courses
php Courses
Jan 18, 2024 · Backend Development

Building an Efficient Web Crawler with PHP and Selenium

This article explains how to set up a web crawler using PHP and Selenium, covering installation of Selenium and its PHP bindings via Composer, configuring a Chrome WebDriver, simulating user actions to fetch news links, extracting titles and content, and storing results, with tips for further optimization.

AutomationPHPWeb Crawler
0 likes · 4 min read
Building an Efficient Web Crawler with PHP and Selenium
php Courses
php Courses
Jan 18, 2024 · Backend Development

Using PHP header() Function: Syntax, Parameters, and Common Use Cases

This article explains the PHP header() function, covering its syntax, parameter details, and typical scenarios such as page redirection, setting HTTP response headers, status codes, cache control, and file downloads, with clear code examples for each case.

PHPbackendheader
0 likes · 4 min read
Using PHP header() Function: Syntax, Parameters, and Common Use Cases
php Courses
php Courses
Jan 17, 2024 · Backend Development

Using PHP implode() to Join Array Elements into a String

This article explains how the PHP implode() function concatenates array elements into a string, demonstrates basic and advanced usages including handling nested arrays and omitting the separator, and provides clear code examples for each scenario.

ArrayPHPbackend
0 likes · 4 min read
Using PHP implode() to Join Array Elements into a String
php Courses
php Courses
Jan 17, 2024 · Backend Development

Understanding PHP 8 Readonly Properties: Definition, Benefits, and Usage

PHP 8 introduces readonly properties that can only be set during object initialization, providing immutable, constant-like behavior useful for defining constants, protecting sensitive data, and enhancing code safety, with examples showing initialization, immutability, consistency, and even getter/setter usage.

ImmutabilityPHPbackend development
0 likes · 6 min read
Understanding PHP 8 Readonly Properties: Definition, Benefits, and Usage
php Courses
php Courses
Jan 16, 2024 · Backend Development

How to Use PHP's str_pad Function for String Padding

This article explains PHP's built‑in str_pad function, detailing its syntax, parameters, and usage examples for right, left, and both‑side string padding, helping developers format strings to a desired length in backend applications.

PHPbackend developmentphp-functions
0 likes · 4 min read
How to Use PHP's str_pad Function for String Padding
php Courses
php Courses
Jan 15, 2024 · Backend Development

Using PHP mb_substr() for Multibyte String Truncation

The article explains the PHP mb_substr() function, its syntax, parameter meanings, and provides multiple code examples demonstrating how to correctly truncate multibyte strings such as Chinese or Japanese without causing garbled output, along with important usage notes.

PHPbackendmb_substr
0 likes · 4 min read
Using PHP mb_substr() for Multibyte String Truncation
php Courses
php Courses
Jan 15, 2024 · Backend Development

Using Named Parameters in PHP 8

PHP 8 introduces named parameters, allowing developers to pass arguments by name instead of position, which improves code readability, reduces errors, simplifies version migration, and enables more self‑documenting function calls, as demonstrated with several HTTP request examples and array‑handling snippets.

PHPbackendcode examples
0 likes · 5 min read
Using Named Parameters in PHP 8
php Courses
php Courses
Jan 12, 2024 · Backend Development

Defining Classes and Using Constructor Property Promotion in PHP

This article explains how to define a PHP class with properties and methods, demonstrates traditional class syntax, introduces PHP 8.0 constructor property promotion for more concise initialization, shows how to set default values, and outlines the benefits of using this feature.

ClassesPHPProperty Promotion
0 likes · 5 min read
Defining Classes and Using Constructor Property Promotion in PHP
php Courses
php Courses
Jan 12, 2024 · Backend Development

Using PHP fwrite() to Write Data to Files

This article explains PHP's fwrite() function, detailing its syntax, parameters, and practical examples for writing strings and serialized arrays to files, while highlighting important usage considerations such as file opening modes and data types.

File HandlingPHPbackend
0 likes · 4 min read
Using PHP fwrite() to Write Data to Files
php Courses
php Courses
Jan 12, 2024 · Backend Development

Four Ways to Reverse an Array in PHP

This article demonstrates four methods to reverse a PHP array—including the built‑in array_reverse() function, a manual for‑loop swap, an array_reduce() technique, and a combination of array_multisort() with array_column()—explaining their usage, code examples, and output results.

PHParray_columnarray_multisort
0 likes · 6 min read
Four Ways to Reverse an Array in PHP
php Courses
php Courses
Jan 11, 2024 · Backend Development

Using PHP file_exists() to Check File and Remote File Existence

This article explains how the PHP file_exists() function works, shows its basic syntax, provides local and remote file existence examples with code, and highlights important considerations such as correct paths, permissions, and potential HTTP overhead.

File HandlingPHPbackend
0 likes · 4 min read
Using PHP file_exists() to Check File and Remote File Existence
php Courses
php Courses
Jan 11, 2024 · Backend Development

Essential Laravel Packages for Backend Development

This article introduces a curated collection of essential Laravel packages, detailing their purpose, key features, and repository links, to help backend developers enhance productivity, debugging, security, and functionality in their applications efficiently.

PHPWeb Developmentlaravel
0 likes · 7 min read
Essential Laravel Packages for Backend Development
php Courses
php Courses
Jan 11, 2024 · Backend Development

Advantages and Disadvantages of Static Methods in PHP

Static methods in PHP allow functions to be called directly via the class without instantiation, offering benefits such as simplicity, resource savings, and reusability, but they also introduce drawbacks like testing difficulty, reduced maintainability, and limited extensibility, requiring careful consideration before use.

PHPbackend developmentcode maintainability
0 likes · 4 min read
Advantages and Disadvantages of Static Methods in PHP
php Courses
php Courses
Jan 10, 2024 · Backend Development

Using PHP’s is_numeric() Function to Determine If a Variable Is Numeric

This article explains how the PHP is_numeric() function checks whether a variable is numeric, returns a boolean result, and demonstrates its usage with code examples for direct variable checks and form input validation, while also highlighting special edge cases to watch out for.

Code ExamplePHPbackend
0 likes · 4 min read
Using PHP’s is_numeric() Function to Determine If a Variable Is Numeric
php Courses
php Courses
Jan 10, 2024 · Backend Development

How to Query MySQL with PHP and Return Results as an Array

This tutorial demonstrates how to set up a PHP script that connects to a MySQL database, executes a SELECT query, stores the result rows in an array, and displays the data in an HTML table using loops such as while and foreach.

MySQLPHPSQL
0 likes · 5 min read
How to Query MySQL with PHP and Return Results as an Array
php Courses
php Courses
Jan 10, 2024 · Backend Development

Containerizing PHP and Nginx with Docker: Step‑by‑Step Guide

This tutorial walks through creating a project structure, writing a simple PHP app, configuring Nginx, authoring Dockerfiles, setting up .dockerignore and docker‑compose.yml, and finally building and running the containers so the PHP service is reachable via Nginx on localhost.

DockerDocker ComposePHP
0 likes · 4 min read
Containerizing PHP and Nginx with Docker: Step‑by‑Step Guide
php Courses
php Courses
Jan 9, 2024 · Databases

Efficiently Inserting 10 Million Records into MySQL with PHP

This tutorial explains how to use PHP and PDO to quickly insert ten million rows into a remote MySQL database by preparing the connection, employing batch inserts, managing transactions, tuning MySQL settings, and optionally using the LOAD DATA statement for optimal performance.

Bulk InsertMySQLPDO
0 likes · 6 min read
Efficiently Inserting 10 Million Records into MySQL with PHP
Open Source Tech Hub
Open Source Tech Hub
Jan 6, 2024 · Backend Development

Securely Implement Pusher Private Channels with PHP and JavaScript

This guide explains how to restrict access to Pusher channels using private channels, covering authentication flow, required server‑side PHP setup, client‑side JavaScript integration, and step‑by‑step code examples for publishing and receiving secure real‑time messages.

JavaScriptPHPPrivate Channels
0 likes · 5 min read
Securely Implement Pusher Private Channels with PHP and JavaScript
php Courses
php Courses
Jan 5, 2024 · Backend Development

Understanding PHP count() and sizeof() Functions: Differences, Usage, and Tips

This article explains the PHP count() and sizeof() functions, clarifying that they are aliases with identical behavior, showing basic usage examples, discussing when to prefer one over the other, and offering performance notes, recursive counting, and object handling tips for developers.

ArraysPHPPerformance
0 likes · 4 min read
Understanding PHP count() and sizeof() Functions: Differences, Usage, and Tips
php Courses
php Courses
Jan 4, 2024 · Backend Development

Common PHP Functions for Searching and Filtering Data

This article introduces essential PHP functions such as strpos, strstr, in_array, array_search, htmlspecialchars, and filter_var, providing clear explanations and example code to help developers efficiently search, filter, and validate strings, arrays, and input data.

PHPString Functionsarray functions
0 likes · 4 min read
Common PHP Functions for Searching and Filtering Data
php Courses
php Courses
Jan 4, 2024 · Backend Development

Five Lesser-Known Laravel Artisan Commands to Boost Development Efficiency

This article introduces five lesser‑known Laravel Artisan commands—event:generate, vendor:publish with assets tag, optimize, make:policy, and down with a custom message—explaining how each can streamline development, improve performance, and simplify maintenance tasks for developers.

ArtisanCLIPHP
0 likes · 6 min read
Five Lesser-Known Laravel Artisan Commands to Boost Development Efficiency
php Courses
php Courses
Jan 4, 2024 · Backend Development

Using Swoole Coroutines to Achieve High Concurrency in PHP Applications

This article explains how to boost PHP application performance by installing the Swoole extension and using its coroutine API to run concurrent tasks such as HTTP requests and database queries, providing code examples and configuration steps for effective backend concurrency.

CoroutinesPHPSwoole
0 likes · 4 min read
Using Swoole Coroutines to Achieve High Concurrency in PHP Applications
High Availability Architecture
High Availability Architecture
Jan 4, 2024 · Backend Development

Refactoring and Optimizing Tencent News Backend Service: Reducing Technical Debt, Improving Efficiency, and Enhancing Stability

This article details the challenges of Tencent News' legacy backend page service, including high code debt, low development efficiency, and poor stability, and describes the systematic refactoring, configuration-driven redesign, performance optimization, and tooling (xhprof, Xdebug, expr) employed to improve maintainability, scalability, and reliability.

PHPbackendconfiguration management
0 likes · 14 min read
Refactoring and Optimizing Tencent News Backend Service: Reducing Technical Debt, Improving Efficiency, and Enhancing Stability
php Courses
php Courses
Jan 3, 2024 · Backend Development

How to Strengthen Website Password Security Using PHP

This article explains how to enhance website password security in PHP by using hash functions, adding salts, employing password_hash and password_verify, enforcing strong password policies, scheduling regular password changes, and implementing measures against brute‑force attacks.

HashingPHPbackend
0 likes · 5 min read
How to Strengthen Website Password Security Using PHP
php Courses
php Courses
Jan 3, 2024 · Fundamentals

Adapter Design Pattern for Integrating Multiple E‑Commerce APIs in PHP

This article explains the Adapter design pattern, illustrates the challenges of aggregating product data from diverse e‑commerce APIs, and provides a complete PHP implementation—including interface definitions, adaptor classes for Shopify, BigCommerce, and WooCommerce, and a ProductFeed aggregator—to achieve a maintainable, extensible solution.

Backend IntegrationDesign PatternsE‑Commerce APIs
0 likes · 9 min read
Adapter Design Pattern for Integrating Multiple E‑Commerce APIs in PHP
Open Source Tech Hub
Open Source Tech Hub
Jan 3, 2024 · Backend Development

How to Package Webman into a Standalone Linux Binary (x86_64)

This guide explains how to install Webman, configure the project, build a self‑contained binary for x86_64 Linux using PHP's phar mechanism, run and monitor the binary, and outlines important compatibility notes and alternative manual packaging methods.

PHPPharbackend
0 likes · 8 min read
How to Package Webman into a Standalone Linux Binary (x86_64)
Tencent Cloud Developer
Tencent Cloud Developer
Jan 2, 2024 · Backend Development

Tencent News Bottom Page Service Upgrade: Refactoring, Configuration, and Performance Optimization

Tencent News refactored its high‑traffic bottom‑page service—handling over 35 k QPS and a billion daily requests—by cleaning 100 k lines of PHP, adopting a JSON‑driven expr configuration layer, integrating profiling tools and CI/CD, which unified five entry scenarios, cut latency, boosted cache hits and raised stability dramatically.

PHPconfiguration managementmicroservices
0 likes · 14 min read
Tencent News Bottom Page Service Upgrade: Refactoring, Configuration, and Performance Optimization
php Courses
php Courses
Jan 2, 2024 · Backend Development

Best Practices for PHP Packaging and Automated Deployment

This article presents a practical, case‑based guide to PHP packaging and automated deployment, covering Composer‑based packaging, Git version control, and Capistrano‑driven deployment to improve development efficiency and project management for teams handling large‑scale web applications.

AutomationCapistranoGit
0 likes · 5 min read
Best Practices for PHP Packaging and Automated Deployment
php Courses
php Courses
Jan 2, 2024 · Backend Development

PHP Function Overloading Analysis and Practical Pseudo‑Overloading Techniques

The article explains why PHP cannot support true function overloading due to its weak typing, then demonstrates three practical techniques—default parameters, using func_get_args with call_user_func_array, and the __call magic method—to achieve pseudo‑overloading with illustrative code examples.

Magic MethodPHPfunction overloading
0 likes · 4 min read
PHP Function Overloading Analysis and Practical Pseudo‑Overloading Techniques
php Courses
php Courses
Dec 29, 2023 · Backend Development

How to Traverse Directories and Retrieve File Information in PHP

This article explains how to use PHP functions such as opendir, readdir, is_dir, and scandir to open directories, read file names, perform recursive traversal of subfolders, and retrieve file information, providing clear code examples for each method.

PHPdirectory traversalopendir
0 likes · 5 min read
How to Traverse Directories and Retrieve File Information in PHP