Tagged articles

PHP

3032 articles · Page 23 of 31
21CTO
21CTO
Oct 23, 2021 · Backend Development

Why We Dropped PHP for Go: Lessons from Rebuilding a High‑Traffic Gaming Platform

In this article, Poki engineers explain why they abandoned PHP in favor of Go while migrating to a micro‑service architecture, discuss the performance and operational benefits of Go, evaluate NoSQL options like MongoDB and Cassandra, and justify sticking with MySQL for their high‑traffic gaming platform.

GoNoSQLPHP
0 likes · 9 min read
Why We Dropped PHP for Go: Lessons from Rebuilding a High‑Traffic Gaming Platform
Laravel Tech Community
Laravel Tech Community
Oct 22, 2021 · Backend Development

apache_getenv — Retrieve Apache Subprocess Environment Variable

The article explains the PHP function apache_getenv, which retrieves the value of a specified Apache environment variable, describes its required Apache 2 context, details its parameters $variable and optional $walk_to_top, outlines the return value, and provides a usage example.

PHPServer configurationbackend development
0 likes · 2 min read
apache_getenv — Retrieve Apache Subprocess Environment Variable
Laravel Tech Community
Laravel Tech Community
Oct 20, 2021 · Backend Development

apache_get_version – Retrieve Apache Version Information

The article documents the PHP function apache_get_version, explaining that it returns the Apache server version string or FALSE on failure, lists that it takes no parameters, describes its return values, and provides a complete PHP example demonstrating its usage.

FunctionPHPbackend development
0 likes · 1 min read
apache_get_version – Retrieve Apache Version Information
Tencent Cloud Developer
Tencent Cloud Developer
Oct 19, 2021 · Backend Development

Comprehensive Guide to gRPC Communication with Go and PHP: Protobuf, Streaming, TLS, and Timeout

This comprehensive guide walks you through creating a gRPC user service in Go and PHP, from defining protobuf messages and generating code, implementing server and client stubs, adding client, server, and bidirectional streaming, securing communication with TLS certificates, and managing request deadlines with timeout controls.

GoPHPStreaming
0 likes · 33 min read
Comprehensive Guide to gRPC Communication with Go and PHP: Protobuf, Streaming, TLS, and Timeout
Laravel Tech Community
Laravel Tech Community
Oct 17, 2021 · Backend Development

PHP mail() Function – Sending Email

This article explains PHP's mail() function, detailing its parameters, usage cautions, return values, and provides a complete code example for sending an email via SMTP, including formatting of recipient addresses, subject line restrictions, message body limits, and header construction.

MailPHPSMTP
0 likes · 3 min read
PHP mail() Function – Sending Email
Laravel Tech Community
Laravel Tech Community
Oct 10, 2021 · Information Security

Common PHP Security Vulnerabilities and Mitigation Strategies

This article outlines ten common PHP security threats—including SQL injection, XSS, CSRF, LFI, weak password hashing, MITM, command injection, XXE, improper error reporting, and login rate limiting—explaining how each attack works and providing practical mitigation techniques such as prepared statements, input sanitization, CSRF tokens, and HTTPS.

PHPSecurityVulnerabilities
0 likes · 15 min read
Common PHP Security Vulnerabilities and Mitigation Strategies
php Courses
php Courses
Sep 26, 2021 · Backend Development

Implementation Guide for Student QR Code Seat Selection Feature in PHP

This article explains how to implement a student QR‑code seat‑selection feature using PHP, detailing database schema design, URL parsing, seat‑allocation logic, attendance tracking, and daily cleanup tasks, enabling teachers to monitor seating without login while automatically recording student attendance.

DatabasePHPQR code
0 likes · 9 min read
Implementation Guide for Student QR Code Seat Selection Feature in PHP
Tencent Cloud Developer
Tencent Cloud Developer
Sep 2, 2021 · Databases

Understanding Geohash: Principles, Implementation, and Applications

Geohash encodes latitude‑longitude pairs into short base‑32 strings by recursively bisecting coordinate ranges and interleaving bits, allowing fast proximity queries via prefix matching, with precision controlled by string length, and is supported natively in Redis and useful for location‑based services.

PHPPrecisionRedis
0 likes · 12 min read
Understanding Geohash: Principles, Implementation, and Applications
Laravel Tech Community
Laravel Tech Community
Sep 2, 2021 · Backend Development

PHP imageloadfont Function: Loading Custom Bitmap Fonts

The article explains PHP's imageloadfont function, which loads a user‑defined bitmap font and returns its identifier, details its string parameter, return values (font ID or FALSE), notes platform‑specific binary format requirements, and provides a complete code example demonstrating image creation, font loading, text rendering, and output as PNG.

PHPbackendbitmap font
0 likes · 2 min read
PHP imageloadfont Function: Loading Custom Bitmap Fonts
Laravel Tech Community
Laravel Tech Community
Aug 30, 2021 · Backend Development

PHP 8.0.10 Release: Security Fixes and Bug Fixes Overview

The PHP 8.0.10 update, a security‑focused release, addresses numerous core, BCMath, CGI, Date, GD, MySQLi, Opcache, OpenSSL, PDO_ODBC, Phar, Shmop, SimpleXML, Standard, and Streams bugs, and users are encouraged to upgrade to benefit from these fixes.

BugFixesPHPSecurity
0 likes · 4 min read
PHP 8.0.10 Release: Security Fixes and Bug Fixes Overview
Laravel Tech Community
Laravel Tech Community
Aug 26, 2021 · Backend Development

Using Laravel Excel to Import and Export Excel/CSV Files in Laravel

This tutorial explains how to integrate the Laravel‑Excel package into a Laravel 5 project, covering Composer installation, service provider and alias configuration, publishing the configuration file, creating a controller with export and import methods, and handling CSV, XLS, and XLSX files both for download and server storage.

CSVExcelImportExport
0 likes · 5 min read
Using Laravel Excel to Import and Export Excel/CSV Files in Laravel
Laravel Tech Community
Laravel Tech Community
Aug 25, 2021 · Backend Development

Implementing Dependency Injection in PHP Using Reflection

This article explains how to build a simple PHP IoC container with reflection to automatically resolve constructor and method dependencies, demonstrates its use with example classes A, B, and C, and shows how to invoke methods with injected parameters.

Design PatternsPHPbackend development
0 likes · 5 min read
Implementing Dependency Injection in PHP Using Reflection
php Courses
php Courses
Aug 24, 2021 · Backend Development

Configuring Alibaba Cloud Composer Mirror for PHP Projects

This guide explains how to set up Alibaba Cloud's Composer mirror, provides global and project‑specific configuration commands, and offers debugging and troubleshooting steps to ensure fast and reliable PHP package management using the latest Composer version.

ConfigurationPHPaliyun
0 likes · 3 min read
Configuring Alibaba Cloud Composer Mirror for PHP Projects
Laravel Tech Community
Laravel Tech Community
Aug 23, 2021 · Fundamentals

Pros and Cons of JavaScript, Haskell, Go, and PHP

This article compares four popular programming languages—JavaScript, Haskell, Go, and PHP—by outlining their key advantages such as rapid prototyping, functional features, simplicity, and ecosystem support, as well as their notable drawbacks including dynamic typing, steep learning curves, lack of generics, and quirky language behaviors.

GoHaskellJavaScript
0 likes · 10 min read
Pros and Cons of JavaScript, Haskell, Go, and PHP
Laravel Tech Community
Laravel Tech Community
Aug 23, 2021 · Backend Development

PHP imagefill() Function: Area Fill in Images

This article explains PHP's imagefill() function, detailing its purpose for region filling in images, describing each parameter (image resource, x and y coordinates, and color), the return values, and provides a complete example script demonstrating its usage.

GDPHPbackend
0 likes · 2 min read
PHP imagefill() Function: Area Fill in Images
Laravel Tech Community
Laravel Tech Community
Aug 20, 2021 · Backend Development

PHP imagecreatetruecolor Function: Creating True Color Images

The article explains PHP's imagecreatetruecolor function, detailing its purpose of creating a true‑color image resource, required parameters width and height, version compatibility notes, return values, and provides a complete example script that generates a PNG with custom text.

GDPHPbackend
0 likes · 2 min read
PHP imagecreatetruecolor Function: Creating True Color Images
php Courses
php Courses
Aug 17, 2021 · Backend Development

Quickly Generate QR Codes in PHP Using phpqrcode

This tutorial explains how to use the open‑source phpqrcode library in PHP to generate QR codes, covering library installation, sample code, function parameters, and displaying the resulting image for easy integration into web projects.

PHPbackendcode
0 likes · 4 min read
Quickly Generate QR Codes in PHP Using phpqrcode
Architecture Digest
Architecture Digest
Aug 12, 2021 · Backend Development

Implementing Real-Time Leaderboards with Redis in PHP

This article explains how to design and implement a real-time ranking system for a mobile tank game using Redis sorted sets, covering leaderboard categories, composite scoring formulas, dynamic updates, data retrieval with pipelines, and provides a complete PHP class example.

Composite ScoreLeaderboardPHP
0 likes · 10 min read
Implementing Real-Time Leaderboards with Redis in PHP
Laravel Tech Community
Laravel Tech Community
Aug 9, 2021 · Backend Development

PHP imagecopy Function: Copying a Portion of an Image

This article explains the PHP imagecopy function, showing its signature, parameters, and how it copies a rectangular region from a source image to a destination image at specified coordinates, providing a concise reference for developers working with image manipulation in backend applications.

GDPHPbackend
0 likes · 1 min read
PHP imagecopy Function: Copying a Portion of an Image
php Courses
php Courses
Aug 9, 2021 · Databases

Interview Transcript: MySQL, Redis, PHP, and Distributed Systems Questions

The article records a video interview where the candidate answers technical questions on MySQL isolation levels, InnoDB indexing, locking, distributed locks, Redis sharding, PHP‑FPM architecture, RabbitMQ, AOP, Hyperf, and other backend topics, reflecting on the challenges faced during the session.

MySQLPHPbackend
0 likes · 7 min read
Interview Transcript: MySQL, Redis, PHP, and Distributed Systems Questions
php Courses
php Courses
Aug 5, 2021 · Backend Development

Common PHP Utility Functions for String Handling, Encryption, and Validation

This article presents a collection of practical PHP utility functions—including string truncation with ellipsis, MD5-based encryption, phone number masking, mobile, numeric and email validation, as well as recursive category handling—complete with usage scenarios and full source code to help developers quickly implement common backend tasks.

EncryptionPHPString Manipulation
0 likes · 8 min read
Common PHP Utility Functions for String Handling, Encryption, and Validation
Laravel Tech Community
Laravel Tech Community
Aug 4, 2021 · Backend Development

PHP imagecolorat: Retrieve Pixel Color Index Value

The article explains PHP's imagecolorat function, which returns the RGB integer of a pixel in a true‑color image using the GD library, and shows how to extract red, green, and blue components with bitwise operations through a complete code example.

GDPHPbackend
0 likes · 2 min read
PHP imagecolorat: Retrieve Pixel Color Index Value
dbaplus Community
dbaplus Community
Aug 1, 2021 · Databases

Bind Slow MySQL Queries to Resource Groups with a Simple PHP Tool

This guide introduces a PHP utility that automatically assigns slow MySQL statements (running over 10 seconds) to a dedicated CPU core using MySQL 8.0 resource groups, explaining installation, configuration, execution, and verification steps, along with required system capabilities.

Database AdministrationMySQLPHP
0 likes · 5 min read
Bind Slow MySQL Queries to Resource Groups with a Simple PHP Tool
Laravel Tech Community
Laravel Tech Community
Jul 27, 2021 · Backend Development

PHP imagearc() Function: Drawing an Elliptical Arc

The PHP imagearc() function draws an elliptical arc on a GD image resource using specified center coordinates, width, height, start and end angles, and color, returning the transformed image on success or FALSE on failure, with a full example demonstrating its usage.

GDGraphicsPHP
0 likes · 2 min read
PHP imagearc() Function: Drawing an Elliptical Arc
Laravel Tech Community
Laravel Tech Community
Jul 22, 2021 · Backend Development

image2wbmp – Output Image as WBMP in PHP

The article explains PHP's image2wbmp() function, detailing its parameters ($image, optional $filename, optional $threshold), return value, and how to output a WBMP image directly or save it to a file, and includes a complete code example.

PHPbackendimage processing
0 likes · 2 min read
image2wbmp – Output Image as WBMP in PHP
Laravel Tech Community
Laravel Tech Community
Jul 20, 2021 · Backend Development

Using PHP getimagesize() to Retrieve Image Dimensions

The article explains PHP's getimagesize() function, which determines the dimensions, type, and MIME information of various image formats, describes its return values, and provides a complete code example demonstrating how to retrieve image size and output the image with appropriate headers.

File HandlingPHPbackend
0 likes · 2 min read
Using PHP getimagesize() to Retrieve Image Dimensions
IT Xianyu
IT Xianyu
Jul 19, 2021 · Backend Development

Implementing a Real‑Time Leaderboard with Redis and PHP

This article explains how to build a real‑time game leaderboard using Redis sorted sets, covering ranking categories, composite scoring formulas, dynamic updates, efficient data retrieval with pipelines, and provides a complete PHP class implementation.

LeaderboardPHPPipeline
0 likes · 11 min read
Implementing a Real‑Time Leaderboard with Redis and PHP
Laravel Tech Community
Laravel Tech Community
Jul 18, 2021 · Backend Development

Retrieving GD Library Information with PHP's gd_info Function

This article explains how the PHP gd_info function returns an associative array describing the installed GD library's version and capabilities, provides details on its return structure, and includes a complete example demonstrating how to dump and interpret the resulting data.

PHPgd_info
0 likes · 2 min read
Retrieving GD Library Information with PHP's gd_info Function
Laravel Tech Community
Laravel Tech Community
Jul 16, 2021 · Backend Development

PHP rewinddir Function – Reset Directory Handle to Start

The PHP rewinddir function resets a directory stream resource opened by opendir() back to the beginning of the directory, returning the filename on success or FALSE on failure, and requires a valid directory handle as its sole parameter.

PHPbackend developmentdirectory handling
0 likes · 1 min read
PHP rewinddir Function – Reset Directory Handle to Start
Laravel Tech Community
Laravel Tech Community
Jul 15, 2021 · Backend Development

PHP readdir Function: Reading Directory Entries

Provides a detailed explanation of PHP's readdir function, including its signature, parameters, return values, and example code demonstrating correct and incorrect ways to iterate through directory entries using a directory handle opened by opendir().

PHPbackend developmentreaddir
0 likes · 2 min read
PHP readdir Function: Reading Directory Entries
Laravel Tech Community
Laravel Tech Community
Jul 7, 2021 · Backend Development

PHP chdir Function: Changing the Working Directory

This article explains PHP's chdir function, detailing its syntax, parameters, return values, and provides a practical example demonstrating how to change the current working directory and verify the change using getcwd in a script.

PHPchdirdirectory
0 likes · 1 min read
PHP chdir Function: Changing the Working Directory
php Courses
php Courses
Jul 2, 2021 · Backend Development

Understanding PHP 8 Internal Array Structure (zend_array)

This article explains PHP 8’s internal array implementation, describing the zend_array (alias zend_array and HashTable) structure, its key‑value storage, ordering, and the detailed fields such as reference counting, flags, bucket data, and associated functions, providing code excerpts for deeper understanding.

PHParray-internalsbackend
0 likes · 6 min read
Understanding PHP 8 Internal Array Structure (zend_array)
php Courses
php Courses
Jun 30, 2021 · Backend Development

Understanding PHP's zend_string Structure and Memory Management

This article explains the internal PHP7+ data structures such as _zval_struct, zend_value, and zend_string, detailing their fields, type definitions, memory layout, flexible array usage, and the associated allocation and release macros that enable efficient, binary‑safe string handling in the Zend Engine.

C languageMemory ManagementPHP
0 likes · 11 min read
Understanding PHP's zend_string Structure and Memory Management
php Courses
php Courses
Jun 29, 2021 · Backend Development

Analyzing PHP Core: Variables and Zend Engine Structures (Part 1)

This article introduces the PHP variable system by examining the Zend Engine's source code, covering variable naming rules, value types, reference and variable variables, file extensions in the PHP source tree, and a detailed walkthrough of the zend_types.h definitions, unions, structs, and memory‑alignment considerations.

C languagePHPbackend
0 likes · 32 min read
Analyzing PHP Core: Variables and Zend Engine Structures (Part 1)
Laravel Tech Community
Laravel Tech Community
Jun 20, 2021 · Backend Development

PHP cal_info Function: Returns Calendar Information

The cal_info() PHP function returns detailed information about a specified calendar—including month names, abbreviations, maximum days, and identifiers—or all supported calendars when no argument is given, with usage examples and output illustrated.

FunctionPHPbackend
0 likes · 3 min read
PHP cal_info Function: Returns Calendar Information
Laravel Tech Community
Laravel Tech Community
Jun 15, 2021 · Fundamentals

Pros and Cons of Five Popular Programming Languages: JavaScript, Haskell, Go, PHP, and Elixir

This article compares five widely used programming languages—JavaScript, Haskell, Go, PHP, and Elixir—by outlining each language’s major advantages such as rapid prototyping, strong type systems, performance, and ecosystem support, as well as notable drawbacks including dynamic typing quirks, steep learning curves, and limited language features.

ElixirGoHaskell
0 likes · 12 min read
Pros and Cons of Five Popular Programming Languages: JavaScript, Haskell, Go, PHP, and Elixir
Laravel Tech Community
Laravel Tech Community
Jun 15, 2021 · Backend Development

PDO::inTransaction – Checking If Inside a Transaction

The PDO::inTransaction method returns a boolean indicating whether the current database connection is actively inside a transaction, works only with drivers that support transactions, takes no parameters, and returns TRUE on success and FALSE on failure.

DatabasePDOPHP
0 likes · 1 min read
PDO::inTransaction – Checking If Inside a Transaction
Laravel Tech Community
Laravel Tech Community
Jun 14, 2021 · Backend Development

PDO::rollBack – Rolling Back a Transaction in PHP

The article explains how the PHP PDO::rollBack() method aborts the current transaction, restores autocommit mode when needed, outlines its parameter‑less signature, return values, and provides a complete code example demonstrating transaction handling and rollback behavior.

DatabasePDOPHP
0 likes · 2 min read
PDO::rollBack – Rolling Back a Transaction in PHP
Architecture Digest
Architecture Digest
Jun 13, 2021 · Backend Development

Implementing a Real-Time Leaderboard with Redis for a Mobile Game

This article explains how to build a real‑time, dual‑dimension leaderboard for a mobile tank game using Redis Sorted Sets, covering ranking types, composite score calculations, dynamic updates, efficient data retrieval with pipelines, and a complete PHP implementation.

LeaderboardPHPRedis
0 likes · 8 min read
Implementing a Real-Time Leaderboard with Redis for a Mobile Game
Laravel Tech Community
Laravel Tech Community
Jun 9, 2021 · Backend Development

PDO::inTransaction – Check If Inside a Transaction

PDO::inTransaction is a PHP PDO method that returns a boolean indicating whether the current database connection is actively within a transaction, applicable only to drivers that support transactions, and it takes no parameters.

DatabasePDOPHP
0 likes · 1 min read
PDO::inTransaction – Check If Inside a Transaction
php Courses
php Courses
Jun 3, 2021 · Backend Development

Various PHP Tips, Tricks, and Gotchas: Parameter Order, String Operators, OpCache, Security, Reflection, and More

This article compiles a wide range of practical PHP knowledge—including function‑parameter ordering, proper salt storage, newline handling, string‑operator precedence, http_build_query quirks, OpCache basics, the HTTPOXY vulnerability, operator precedence nuances, instanceof behavior, array_map tricks, performance considerations for array functions, type‑juggling pitfalls, comparison changes in PHP 8, and different ways to merge arrays—providing code examples and references for each topic.

PHPbackendphp-operators
0 likes · 23 min read
Various PHP Tips, Tricks, and Gotchas: Parameter Order, String Operators, OpCache, Security, Reflection, and More
Laravel Tech Community
Laravel Tech Community
May 28, 2021 · Backend Development

PHP mcrypt_generic() Function for Data Encryption

The article explains PHP's mcrypt_generic() function, detailing its purpose for encrypting data, required parameters ($td as the encryption descriptor and $data as the plaintext), the need for block-size-aligned input, initialization and cleanup steps, and the nature of its returned encrypted output.

EncryptionPHPSecurity
0 likes · 2 min read
PHP mcrypt_generic() Function for Data Encryption
php Courses
php Courses
May 28, 2021 · Backend Development

Resolving the PHP Type‑Hint Error: Argument 1 Must Be an Instance of int

This article explains a confusing PHP error where a method expects an instance of int but receives an integer, analyzes three common causes—including an incorrect use statement, outdated PHP version, and unnecessary type hint—and provides concise solutions for each.

PHPbackendphp7
0 likes · 2 min read
Resolving the PHP Type‑Hint Error: Argument 1 Must Be an Instance of int
Laravel Tech Community
Laravel Tech Community
May 27, 2021 · Backend Development

PHP mcrypt_encrypt Function: Parameters, Usage, and Return Value

mcrypt_encrypt encrypts plaintext using a specified cipher, key, mode, and optional IV, returning the ciphertext as a string or FALSE on failure, with detailed explanations of each parameter—including cipher name, key length requirements, data padding, mode options, and IV usage—provided for PHP developers.

PHPbackendmcrypt
0 likes · 2 min read
PHP mcrypt_encrypt Function: Parameters, Usage, and Return Value
Laravel Tech Community
Laravel Tech Community
May 24, 2021 · Backend Development

8 Essential Built‑in PHP Functions Every Developer Should Know

This article presents eight essential built‑in PHP functions—including variable‑argument handling, file searching with glob(), memory and CPU usage monitoring, system constants, unique ID generation, serialization, and string compression—complete with clear code examples to help developers write more efficient PHP code.

PHPbackend developmentbuilt-in functions
0 likes · 9 min read
8 Essential Built‑in PHP Functions Every Developer Should Know
php Courses
php Courses
May 24, 2021 · Backend Development

PHP Interview Questions and Sample Code Answers

This article presents a comprehensive collection of PHP interview questions covering topics such as directory creation, Smarty template features, safe mode restrictions, file handling, regular expressions, MVC concepts, and includes complete code examples for each solution.

PHPbackendcode
0 likes · 27 min read
PHP Interview Questions and Sample Code Answers