Tagged articles

PHP

3032 articles · Page 27 of 31
Laravel Tech Community
Laravel Tech Community
Sep 6, 2020 · Backend Development

PHP str_split() Function – Convert a String to an Array

The article explains PHP's str_split() function, which converts a string into an array of characters or fixed‑length chunks, details its parameters and return behavior, and provides example code with output, including demonstrating how split_length affects the result.

ArrayFunctionPHP
0 likes · 2 min read
PHP str_split() Function – Convert a String to an Array
Laravel Tech Community
Laravel Tech Community
Sep 4, 2020 · Backend Development

Using PHP implode() to Convert an Array into a String

This article explains how the PHP implode() function joins the values of a one‑dimensional array into a single string, describes its parameters and return value, and provides clear code examples demonstrating typical usage and edge cases.

ArrayPHPbackend
0 likes · 2 min read
Using PHP implode() to Convert an Array into a String
Laravel Tech Community
Laravel Tech Community
Sep 1, 2020 · Fundamentals

PHP Design Patterns: Singleton, Factory, Registry, Adapter, and Observer

This article introduces common PHP design patterns—including Singleton, Factory, Registry, Adapter, and Observer—explaining their purpose, structure, typical use cases, and providing complete code examples for each pattern to illustrate how they can be implemented in object‑oriented applications.

Design PatternsPHPadapter
0 likes · 7 min read
PHP Design Patterns: Singleton, Factory, Registry, Adapter, and Observer
Laravel Tech Community
Laravel Tech Community
Sep 1, 2020 · Backend Development

Using PHP fputcsv() to Write CSV Files

This article explains how the PHP fputcsv() function formats an array as a CSV line and writes it to a file, detailing its parameters, return value, and providing a complete example with code and the resulting CSV output.

CSVFile I/OPHP
0 likes · 2 min read
Using PHP fputcsv() to Write CSV Files
Laravel Tech Community
Laravel Tech Community
Aug 30, 2020 · Backend Development

PHP ltrim() Function: Removing Leading Characters from Strings

The article explains PHP's ltrim() function, its syntax, parameters, default characters removed, and provides example code demonstrating how to strip whitespace or custom characters from the start of a string, including removing ASCII control characters.

PHPString Manipulationbackend
0 likes · 3 min read
PHP ltrim() Function: Removing Leading Characters from Strings
Huawei Cloud Developer Alliance
Huawei Cloud Developer Alliance
Aug 19, 2020 · Cloud Computing

Deploy Discuz! Forum on Huawei Cloud in 6 Simple Steps

This step‑by‑step guide shows how to set up a Discuz! forum on a Huawei Cloud CentOS 7.6 server, covering cloud login, security group configuration, installation of Apache, PHP, MariaDB, downloading and deploying Discuz! source, and final web‑based installation.

ApacheDiscuzHuawei Cloud
0 likes · 6 min read
Deploy Discuz! Forum on Huawei Cloud in 6 Simple Steps
Laravel Tech Community
Laravel Tech Community
Aug 17, 2020 · Backend Development

PHP strpbrk() Function: Find Characters in a String

This article explains the PHP strpbrk() function, which searches a haystack string for any character from a given list, details its parameters and return value, and provides two illustrative code examples demonstrating case‑sensitive matching and character selection.

Code ExamplePHPbackend
0 likes · 2 min read
PHP strpbrk() Function: Find Characters in a String
Xueersi Online School Tech Team
Xueersi Online School Tech Team
Aug 14, 2020 · Backend Development

Introducing Fend: A High‑Performance Open‑Source PHP Framework from TAL Education

The article presents Fend, an open‑source high‑performance PHP framework released by TAL Education's technology team, detailing its design philosophy, feature set, dual FPM/Swoole engine support, performance benchmarks, installation procedures for multiple versions, and its widespread adoption across the company's online services.

PHPSwoolefpm
0 likes · 8 min read
Introducing Fend: A High‑Performance Open‑Source PHP Framework from TAL Education
Laravel Tech Community
Laravel Tech Community
Aug 13, 2020 · Fundamentals

IDE Shortcut Techniques and Common Control‑Flow Statements for PHP/Java

This article introduces powerful IDE code‑completion shortcuts and demonstrates how to use fundamental control‑flow constructs such as if, switch, while, for loops, variable definitions, and common statements like return, print, try‑catch and throw in PHP/Java, providing code examples to boost development efficiency.

Control FlowIDE shortcutsJava
0 likes · 4 min read
IDE Shortcut Techniques and Common Control‑Flow Statements for PHP/Java
Laravel Tech Community
Laravel Tech Community
Aug 13, 2020 · Backend Development

WordPress New Release Features and Developer Updates

The article outlines the latest WordPress release, highlighting performance improvements such as image lazy loading, new XML sitemap support, enhanced block editor capabilities, accessibility upgrades, and a series of developer‑focused updates including REST API block registration, environment definitions, updated libraries, and new functions for theme and plugin development.

CMSPHPREST API
0 likes · 3 min read
WordPress New Release Features and Developer Updates
Laravel Tech Community
Laravel Tech Community
Aug 11, 2020 · Backend Development

Understanding IoC, Simple Factory, and Dependency Injection in PHP

This article explains the Inversion of Control (IoC) pattern, demonstrates a simple factory for creating traffic‑tool objects, and shows how to apply Dependency Injection (DI) in PHP to decouple a Student class from concrete transportation implementations, culminating in a lightweight IoC container example.

Design PatternsIoCPHP
0 likes · 7 min read
Understanding IoC, Simple Factory, and Dependency Injection in PHP
Laravel Tech Community
Laravel Tech Community
Aug 10, 2020 · Backend Development

CakePHP 4.1.2 Released – New Features and Fixes

CakePHP 4.1.2 has been released, bringing a series of bug fixes, PHP 8 compatibility improvements, enhanced type checking for validation methods, better module autoloading, millisecond‑level logging, corrected HEAD request handling, and refined database and XML entity processing.

CakePHPPHPUPDATE
0 likes · 2 min read
CakePHP 4.1.2 Released – New Features and Fixes
Laravel Tech Community
Laravel Tech Community
Aug 6, 2020 · Backend Development

PHP rawurldecode() Function – Description, Parameters, Return Value, and Examples

rawurldecode() is a PHP function that decodes URL‑encoded strings by converting percent‑encoded hexadecimal sequences back to their original characters, returning the decoded string; the article explains its usage, parameters, return value, and provides example code demonstrating its behavior compared to urlencode and urldecode.

PHPURL decodingrawurldecode
0 likes · 2 min read
PHP rawurldecode() Function – Description, Parameters, Return Value, and Examples
Laravel Tech Community
Laravel Tech Community
Aug 2, 2020 · Backend Development

PHP http_build_query Function: Usage, Parameters, and Examples

This article explains the PHP http_build_query function, detailing its purpose of generating URL‑encoded query strings from arrays or objects, describing each parameter (query_data, numeric_prefix, arg_separator, enc_type), the return value, and providing multiple code examples illustrating typical usage and output.

PHPURL encodingWeb Development
0 likes · 3 min read
PHP http_build_query Function: Usage, Parameters, and Examples
Laravel Tech Community
Laravel Tech Community
Jul 27, 2020 · Backend Development

Mastering PHP’s pclose(): Properly Closing Process Pipes

This guide explains the PHP pclose() function, its signature, how it closes a process opened with popen(), the required handle parameter, the return values indicating the process termination status, and provides a clear example demonstrating its correct usage.

FunctionPHPbackend
0 likes · 2 min read
Mastering PHP’s pclose(): Properly Closing Process Pipes
Laravel Tech Community
Laravel Tech Community
Jul 26, 2020 · Backend Development

Understanding PHP's feof() Function and Safe EOF Handling

This article explains PHP's feof() function, detailing its purpose, required handle parameter, return values, and provides two practical code examples—one demonstrating a safe EOF check with timeout and another showing how to handle missing files without entering infinite loops.

File HandlingPHPbackend
0 likes · 2 min read
Understanding PHP's feof() Function and Safe EOF Handling
Laravel Tech Community
Laravel Tech Community
Jul 25, 2020 · Backend Development

Using PHP pfsockopen() for Persistent Socket Connections

This article explains the PHP pfsockopen() function, its parameters, return values, and provides a complete example demonstrating how to establish a persistent SSL socket, send an HTTP POST request, and read the response using low‑level socket operations.

PHPPersistent ConnectionSocket
0 likes · 4 min read
Using PHP pfsockopen() for Persistent Socket Connections
Laravel Tech Community
Laravel Tech Community
Jul 24, 2020 · Backend Development

PHP fsockopen() Function: Usage, Parameters, and Examples

fsockopen() opens a network or Unix socket connection in PHP, with detailed parameter explanations, default behavior, error handling, and two practical code examples demonstrating HTTP GET requests and UDP socket usage, along with notes on blocking mode and related functions.

PHPSocketbackend
0 likes · 4 min read
PHP fsockopen() Function: Usage, Parameters, and Examples
Laravel Tech Community
Laravel Tech Community
Jul 22, 2020 · Backend Development

PHP file_get_contents Function: Description, Parameters, Return Value, and Usage Examples

This article explains the PHP file_get_contents function, detailing its purpose of reading an entire file into a string, describing each parameter and return value, and providing multiple practical code examples demonstrating basic usage, include path handling, partial reads, and custom stream contexts.

File HandlingPHPbackend development
0 likes · 3 min read
PHP file_get_contents Function: Description, Parameters, Return Value, and Usage Examples
Laravel Tech Community
Laravel Tech Community
Jul 18, 2020 · Backend Development

Using PHP is_link() to Detect Symbolic Links

This article explains the PHP is_link() function, its purpose of checking whether a given filename is a symbolic link, details its parameter and return values, and provides two practical code examples demonstrating how to use it for link detection and handling.

PHPSymbolic Linkbackend
0 likes · 2 min read
Using PHP is_link() to Detect Symbolic Links
Laravel Tech Community
Laravel Tech Community
Jul 13, 2020 · Backend Development

Implementing Real‑Time Communication with Workerman and GatewayWorker Using WebSocket in PHP

This tutorial explains how to use the Workerman PHP socket framework and GatewayWorker to replace HTTP long‑polling with WebSocket‑based real‑time communication, covering protocol basics, short vs. long connections, integration with MVC frameworks, and complete client‑ and server‑side code examples.

PHPReal‑time communicationlong-connection
0 likes · 8 min read
Implementing Real‑Time Communication with Workerman and GatewayWorker Using WebSocket in PHP
Laravel Tech Community
Laravel Tech Community
Jul 8, 2020 · Backend Development

PHP file() Function: Reading Files into an Array

The PHP file() function reads an entire file into an array, offering optional flags to control path lookup, line handling, and context usage, with examples showing how to display lines, concatenate content, and apply flag combinations for flexible file processing.

ArrayFile HandlingPHP
0 likes · 3 min read
PHP file() Function: Reading Files into an Array
Laravel Tech Community
Laravel Tech Community
Jul 7, 2020 · Backend Development

PHP rawurldecode Function and Custom UTF-8 URL Decoding

This article explains PHP's rawurldecode() function for decoding URL‑encoded strings, shows its signature, parameters, return value, provides a simple usage example, notes UTF‑8 considerations, and presents a custom utf8RawUrlDecode() function for handling non‑standard %uXXXX sequences.

PHPURL decodingbackend
0 likes · 3 min read
PHP rawurldecode Function and Custom UTF-8 URL Decoding
Laravel Tech Community
Laravel Tech Community
Jul 4, 2020 · Backend Development

PHP urlencode Function: Usage, Parameters, and Examples

This article explains the PHP urlencode() function, describing how it converts characters to URL‑encoded format, detailing its parameter and return value, and providing two practical code examples that demonstrate encoding strings for safe inclusion in URLs.

PHPurlencode
0 likes · 2 min read
PHP urlencode Function: Usage, Parameters, and Examples
Laravel Tech Community
Laravel Tech Community
Jul 1, 2020 · Backend Development

How to Convert Newlines to HTML Breaks with PHP’s nl2br Function

Learn how PHP's nl2br function inserts HTML line break tags before every newline in a string, understand its optional XHTML mode, see detailed parameter explanations, and explore three practical code examples demonstrating different newline scenarios and their resulting HTML output.

FunctionHTMLPHP
0 likes · 2 min read
How to Convert Newlines to HTML Breaks with PHP’s nl2br Function
Laravel Tech Community
Laravel Tech Community
Jun 29, 2020 · Backend Development

PHP strncmp Function: Binary‑Safe String Comparison

The article explains PHP's strncmp function, a binary‑safe, case‑sensitive string comparison that compares the first N characters of two strings, detailing its syntax, parameters, return values, and providing practical code examples with expected outputs.

PHPbackend developmentbinary safe
0 likes · 2 min read
PHP strncmp Function: Binary‑Safe String Comparison
Laravel Tech Community
Laravel Tech Community
Jun 28, 2020 · Backend Development

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

This article explains the PHP strcmp() function, describing its binary‑safe, case‑sensitive string comparison behavior, detailing its parameters and return values, and providing multiple code examples that illustrate how different string inputs affect the function’s output.

Code ExamplePHPbackend development
0 likes · 2 min read
PHP strcmp() Function: Usage, Parameters, Return Values, and Examples
dbaplus Community
dbaplus Community
Jun 28, 2020 · Databases

How to Build a Visual MongoDB Slow Query Dashboard with PHP

This guide explains how to set up a PHP‑based web platform that collects MongoDB slow‑query logs via remote profiling, stores them in MySQL, and visualizes the data, including installation of required PHP extensions, database preparation, configuration, cron scheduling, and enabling profiling on MongoDB.

MongoDBPHPmonitoring
0 likes · 7 min read
How to Build a Visual MongoDB Slow Query Dashboard with PHP
Laravel Tech Community
Laravel Tech Community
Jun 21, 2020 · Backend Development

Laravel User Authentication Setup Guide: Environment, Installation, Configuration, Controllers, Routes, and Middleware

This tutorial walks through configuring Laravel's user authentication by outlining server requirements, installing Laravel via Composer, setting up the application key, configuring auth files, creating controllers, defining routes, implementing middleware verification, and testing the login flow.

MiddlewarePHPcomposer
0 likes · 3 min read
Laravel User Authentication Setup Guide: Environment, Installation, Configuration, Controllers, Routes, and Middleware
Beike Product & Technology
Beike Product & Technology
Jun 18, 2020 · Backend Development

Optimizing PHP strtolower with SSE2 in PHP 8

This article explains how PHP's case‑insensitive function handling can be accelerated by implementing a locale‑independent strtolower using SSE2 SIMD instructions in PHP 8, compares it with previous table‑lookup methods, and discusses a further Yaf‑specific optimization.

OptimizationPHPPerformance
0 likes · 6 min read
Optimizing PHP strtolower with SSE2 in PHP 8
Laravel Tech Community
Laravel Tech Community
Jun 17, 2020 · Backend Development

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

This article explains PHP's strstr() function, detailing its purpose of locating the first occurrence of a needle in a haystack string, describing its parameters and return values, noting case‑sensitivity and performance considerations, and providing two practical code examples.

Code ExamplePHPbackend development
0 likes · 2 min read
PHP strstr() Function: Usage, Parameters, Return Values, and Examples
Laravel Tech Community
Laravel Tech Community
Jun 14, 2020 · Backend Development

Symfony 5.1.1 Release: New Features and Bug Fixes

Symfony 5.1.1 has been released, offering an MVC‑based PHP framework that reduces repetitive code, integrates well with relational databases, provides extensive configuration options for enterprise applications, and includes a suite of tools such as testing, debugging, and documentation, alongside numerous bug fixes listed in the release notes.

BugFixesPHPbackend
0 likes · 3 min read
Symfony 5.1.1 Release: New Features and Bug Fixes
Laravel Tech Community
Laravel Tech Community
Jun 13, 2020 · Backend Development

Inserting and Updating Related Models with Laravel Eloquent

This article explains how to add, update, and manage related Eloquent models in Laravel—including saving single or multiple related records, using associate/dissociate for belongsTo relations, and handling many‑to‑many pivots with attach, detach, sync, toggle, and timestamp propagation.

DatabaseEloquentORM
0 likes · 7 min read
Inserting and Updating Related Models with Laravel Eloquent
Laravel Tech Community
Laravel Tech Community
Jun 13, 2020 · Backend Development

Understanding Eager Loading in Laravel Eloquent

This article explains Laravel Eloquent's eager loading techniques, demonstrating how to replace lazy-loaded N+1 queries with the with() method, preload multiple or nested relationships, select specific columns, apply constraints, and use lazy eager loading methods like load and loadMissing, all illustrated with PHP code examples.

Eager LoadingEloquentORM
0 likes · 6 min read
Understanding Eager Loading in Laravel Eloquent
Laravel Tech Community
Laravel Tech Community
Jun 13, 2020 · Backend Development

Understanding Laravel Eloquent Relationships: HasManyThrough, Polymorphic, and Advanced Query Techniques

This article explains how to define and use Laravel Eloquent relationships—including remote one‑to‑many (hasManyThrough), polymorphic, many‑to‑many polymorphic, and various query constraints—by showing required database schemas, model methods, and example code for retrieving and counting related records.

DatabaseEloquentORM
0 likes · 11 min read
Understanding Laravel Eloquent Relationships: HasManyThrough, Polymorphic, and Advanced Query Techniques
Laravel Tech Community
Laravel Tech Community
Jun 13, 2020 · Backend Development

One-to-Many Relationships in Laravel Eloquent

This article explains how to define and use one-to-many and inverse (belongsTo) relationships in Laravel's Eloquent ORM, including default foreign key conventions, accessing related records, applying query constraints, and customizing foreign and local keys with code examples.

EloquentORMOne-to-Many
0 likes · 5 min read
One-to-Many Relationships in Laravel Eloquent
Xueersi Online School Tech Team
Xueersi Online School Tech Team
Jun 12, 2020 · Backend Development

Understanding Swoole Coroutines and Asynchronous I/O in PHP

This article explains the fundamentals of Swoole coroutines, how they differ from threads and processes, the relationship between coroutines and asynchronous I/O, and provides practical code examples for timers, tasks, and concurrent DNS queries to help PHP developers write efficient, non‑blocking backend applications.

PHPSwooleasynchronous I/O
0 likes · 14 min read
Understanding Swoole Coroutines and Asynchronous I/O in PHP
58 Tech
58 Tech
Jun 12, 2020 · Backend Development

Service Refactoring and Performance Optimization for 58 Rental Business System

This article presents a comprehensive case study on how the 58 rental platform refactored its services and optimized performance by splitting common modules, adopting async interfaces, leveraging nginx + swoole, implementing data caching and pre‑loading, resulting in significant reductions in page rendering time and service latency across major app pages.

PHPSwoolebackend architecture
0 likes · 9 min read
Service Refactoring and Performance Optimization for 58 Rental Business System
Laravel Tech Community
Laravel Tech Community
Jun 8, 2020 · Backend Development

PHP 8 Performance Benchmark Report by Phoronix

Phoronix benchmarked multiple PHP versions, including PHP 8 with and without JIT, revealing that PHP 8 offers modest gains over PHP 7.4 but a dramatic 92% speed increase when JIT is enabled, while older versions lag far behind.

JITPHPPerformance
0 likes · 5 min read
PHP 8 Performance Benchmark Report by Phoronix
21CTO
21CTO
Jun 7, 2020 · Fundamentals

How to Eliminate Redundant Code: A Practical DRY Refactoring Guide in PHP

This article explains the DRY (Do Not Repeat Yourself) principle, demonstrates how duplicated PHP code in a Report class can be refactored by extracting shared logic into reusable methods, and shows the final clean implementation that improves readability and maintainability.

Code RefactoringDRYPHP
0 likes · 7 min read
How to Eliminate Redundant Code: A Practical DRY Refactoring Guide in PHP
Laravel Tech Community
Laravel Tech Community
Jun 5, 2020 · Backend Development

PhpStorm 2020.1 Update Adds WSL 2 Support and Important Fixes

PhpStorm 2020.1’s second update introduces support for Windows Subsystem for Linux 2, enabling developers to configure a Linux‑based PHP interpreter on Windows, while also delivering several critical bug fixes and clarifying that Docker integration via WSL 2 is not yet available.

IDEPHPPhpStorm
0 likes · 2 min read
PhpStorm 2020.1 Update Adds WSL 2 Support and Important Fixes
Laravel Tech Community
Laravel Tech Community
Jun 3, 2020 · Backend Development

Mastering PHP's ltrim(): Remove Unwanted Characters from Strings

This article explains how PHP's ltrim() function removes leading whitespace or custom-specified characters from strings, details its parameters and default character set, and provides clear code examples demonstrating default trimming, custom masks, and range-based character removal.

PHPString Manipulationbackend
0 likes · 3 min read
Mastering PHP's ltrim(): Remove Unwanted Characters from Strings
Laravel Tech Community
Laravel Tech Community
Jun 2, 2020 · Backend Development

Comprehensive Guide to Laravel Routing: Definitions, Parameters, Groups, Middleware, Prefixes, Sub‑domains, Namespaces, and Caching

This article provides an in‑depth tutorial on Laravel routing, covering basic route definitions, HTTP verbs, parameter handling, regex constraints, route naming, grouping, middleware, prefixes, sub‑domains, namespaces, and cache management, complete with code examples for each feature.

MiddlewarePHPRoute Grouping
0 likes · 5 min read
Comprehensive Guide to Laravel Routing: Definitions, Parameters, Groups, Middleware, Prefixes, Sub‑domains, Namespaces, and Caching
Laravel Tech Community
Laravel Tech Community
May 31, 2020 · Backend Development

PHP str_shuffle() Function: Randomly Shuffle a String

The article explains PHP’s str_shuffle() function, detailing its syntax, parameter description, return value, and provides a complete example that demonstrates how to assign a string, shuffle it with str_shuffle, and output the randomized result.

PHPrandomizationstr_shuffle
0 likes · 1 min read
PHP str_shuffle() Function: Randomly Shuffle a String
Laravel Tech Community
Laravel Tech Community
May 29, 2020 · Backend Development

Swoole Coroutine Channel: Overview, Methods, and Example Usage

This article introduces Swoole's Coroutine Channel for inter‑coroutine communication, explains its memory‑efficient implementation and key methods such as __construct, push, pop, stats, close, length, isEmpty, isFull, capacity and errCode, and provides a complete PHP example demonstrating producer‑consumer behavior.

PHPSwooleasync
0 likes · 5 min read
Swoole Coroutine Channel: Overview, Methods, and Example Usage
Laravel Tech Community
Laravel Tech Community
May 28, 2020 · Backend Development

Using Swoole Atomic for Lock‑Free Counters in PHP

Because PHP lacks native multithreading, Swoole adopts a multi‑process model and provides the Atomic class for lock‑free integer operations, which can be shared across worker processes; this guide explains its purpose, configuration, usage patterns, code examples, and important pitfalls.

Lock-FreePHPSwoole
0 likes · 3 min read
Using Swoole Atomic for Lock‑Free Counters in PHP
Laravel Tech Community
Laravel Tech Community
May 26, 2020 · Backend Development

Master PHP’s stristr() for Case‑Insensitive String Searches

Learn how PHP’s stristr() function performs a case‑insensitive search within a string, understand its syntax, parameters, return values, and see three practical code examples that illustrate basic usage, checking for absence, and using character codes, along with key differences from strstr().

PHPString Functionsbackend
0 likes · 3 min read
Master PHP’s stristr() for Case‑Insensitive String Searches
Laravel Tech Community
Laravel Tech Community
May 24, 2020 · Backend Development

Mastering PHP substr(): How to Extract Substrings Effectively

This article explains the PHP substr() function, detailing its signature, parameter behavior for positive and negative start and length values, return values, and provides multiple code examples demonstrating various edge cases and expected outputs.

PHPString Manipulationbackend
0 likes · 3 min read
Mastering PHP substr(): How to Extract Substrings Effectively
Laravel Tech Community
Laravel Tech Community
May 24, 2020 · Backend Development

Creating a TCP Server with Swoole in PHP

This article demonstrates how to build a high‑performance asynchronous TCP server using the Swoole extension in PHP, covering server creation, event callbacks for connection, data reception, and closure, as well as testing the server with telnet or netcat.

PHPSwooleTCP
0 likes · 3 min read
Creating a TCP Server with Swoole in PHP
Laravel Tech Community
Laravel Tech Community
May 23, 2020 · Backend Development

Mastering Swoole Timer: tick, after, clear and Advanced Methods Explained

This article provides a detailed guide to Swoole's millisecond‑precision timer API, covering the underlying epoll_wait/setitimer implementation, the static methods tick(), after(), clear() and additional utilities such as clearAll(), info(), list(), stats() and set(), with full syntax, usage examples and code snippets for both synchronous and asynchronous processes.

AsynchronousPHPPerformance
0 likes · 5 min read
Mastering Swoole Timer: tick, after, clear and Advanced Methods Explained
Laravel Tech Community
Laravel Tech Community
May 21, 2020 · Databases

When to Use Optimistic vs. Pessimistic Locks in MySQL (and Redis)

This article explains the concepts, advantages, and drawbacks of MySQL pessimistic and optimistic locks, shows how to implement each with SQL and PHP code, compares their suitability for different traffic patterns, and demonstrates a Redis‑based optimistic lock for high‑concurrency flash‑sale scenarios.

MySQLPHPRedis
0 likes · 10 min read
When to Use Optimistic vs. Pessimistic Locks in MySQL (and Redis)
Laravel Tech Community
Laravel Tech Community
May 21, 2020 · Backend Development

Implementing a WebSocket Server and Client with Swoole in PHP

This tutorial demonstrates how to build a WebSocket server using PHP's Swoole extension and a corresponding HTML/JavaScript client, covering protocol basics, server-side event handling for connections, messages, and closures, and showing the complete code and execution results for real‑time bidirectional communication.

PHPSwoolebackend development
0 likes · 4 min read
Implementing a WebSocket Server and Client with Swoole in PHP
Laravel Tech Community
Laravel Tech Community
May 19, 2020 · Backend Development

Laravel String Helper Cheat Sheet

This article provides a concise reference of Laravel's String helper functions, describing each method's purpose and showing example code snippets for common string operations such as conversion, case manipulation, searching, and generating random strings.

HelperPHPbackend
0 likes · 2 min read
Laravel String Helper Cheat Sheet
Laravel Tech Community
Laravel Tech Community
May 18, 2020 · Backend Development

Master Laravel Collections: Powerful Methods to Filter, Transform, and Analyze Data

This tutorial explains how Laravel Eloquent returns collections, how to create collections with the collect helper, and demonstrates essential collection methods such as filter, search, chunk, zip, map, each, tap, pipe, contains, whereNotIn, max, pluck, and avg, complete with code examples and expected outputs.

CollectionsData manipulationEloquent
0 likes · 11 min read
Master Laravel Collections: Powerful Methods to Filter, Transform, and Analyze Data