Tagged articles
15 articles
Page 1 of 1
php Courses
php Courses
Nov 28, 2025 · Backend Development

Master PHP’s usort(): Custom Sorting Made Simple

This guide explains how PHP's usort() function sorts arrays using a user‑defined comparison callback, covering its signature, how to write comparison functions, examples for numeric and associative arrays, and important considerations for reliable custom sorting.

PHParray sortingcustom comparator
0 likes · 5 min read
Master PHP’s usort(): Custom Sorting Made Simple
php Courses
php Courses
Nov 18, 2025 · Backend Development

Master PHP’s rsort: Sort Arrays Descending with Simple Code

This guide explains PHP’s rsort function, showing its syntax, parameters, and how to use it to sort arrays in descending order, while also covering optional sort flags for numeric, string, locale, natural, and case‑insensitive sorting.

array sortingdescending-orderphp-functions
0 likes · 4 min read
Master PHP’s rsort: Sort Arrays Descending with Simple Code
php Courses
php Courses
Sep 25, 2025 · Backend Development

Master PHP’s usort(): Custom Array Sorting Made Easy

This article explains how the PHP usort() function works, shows the required comparison function syntax, provides step‑by‑step code examples for sorting numeric arrays, associative arrays, and objects, and highlights important usage notes and pitfalls to ensure reliable custom array sorting.

Backendarray sortingcomparison-function
0 likes · 5 min read
Master PHP’s usort(): Custom Array Sorting Made Easy
php Courses
php Courses
Apr 23, 2025 · Backend Development

How to Use PHP usort() for Custom Array Sorting

This article explains the PHP usort() function, its syntax, how to write comparison callbacks, and provides practical examples for sorting numeric arrays, associative arrays of objects, and handling common pitfalls such as stability and in‑place modification.

array sortingcomparison-functionusort
0 likes · 5 min read
How to Use PHP usort() for Custom Array Sorting
php Courses
php Courses
Aug 5, 2024 · Backend Development

Using PHP usort() Function for Custom Array Sorting

This article explains the PHP usort() function, detailing its syntax, how to write custom comparison callbacks, and provides step‑by‑step examples for sorting numeric arrays, associative arrays of objects, and handling common pitfalls such as return values and in‑place array modification.

PHParray sortingbackend-development
0 likes · 6 min read
Using PHP usort() Function for Custom Array Sorting
php Courses
php Courses
May 23, 2024 · Backend Development

Using PHP rsort Function to Sort Arrays in Descending Order

This article explains the PHP rsort function, its syntax, parameters, and sorting flags, and provides a step‑by‑step code example that demonstrates how to sort an array in descending order and output the result, along with a brief overview of additional sorting options.

PHParray sortingbackend-development
0 likes · 4 min read
Using PHP rsort Function to Sort Arrays in Descending Order
php Courses
php Courses
Feb 29, 2024 · Backend Development

Using PHP rsort Function to Sort Arrays in Descending Order

This article explains the PHP rsort function, detailing its syntax, parameters, and usage for sorting arrays in descending order, provides a complete code example, and outlines additional sorting flags such as SORT_NUMERIC, SORT_STRING, SORT_LOCALE_STRING, SORT_NATURAL, and SORT_FLAG_CASE.

PHParray sortingrsort
0 likes · 3 min read
Using PHP rsort Function to Sort Arrays in Descending Order
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
Aug 12, 2023 · Backend Development

Using natcasesort() in PHP for Natural Case‑Insensitive Array Sorting

This article explains how PHP's natcasesort() function performs natural, case‑insensitive sorting on one‑dimensional arrays, modifies the original array in place, returns a boolean status, and provides usage examples and important considerations.

PHParray sortingcase-insensitive
0 likes · 3 min read
Using natcasesort() in PHP for Natural Case‑Insensitive Array Sorting
php Courses
php Courses
Feb 10, 2022 · Backend Development

Why PHP’s asort/Arr::sort Shows Different Stability Behaviors in PHP 5, 7, and 8

The article investigates why PHP’s array sorting functions appear stable in some versions and unstable in others, analyzing Laravel’s Arr::sort implementation, PHP source code, version‑specific optimizations, and practical test cases that reveal a quick‑sort threshold causing nondeterministic ordering.

Laravelarray sortingstability
0 likes · 6 min read
Why PHP’s asort/Arr::sort Shows Different Stability Behaviors in PHP 5, 7, and 8
Laravel Tech Community
Laravel Tech Community
Dec 28, 2020 · Backend Development

PHP rsort() Function – Reverse Sorting an Array

The article explains PHP’s rsort() function, which sorts an array in reverse order, details its parameters and return values, and provides a complete example showing how to sort a fruit list and output the sorted elements with their indices.

array sortingbackend-developmentexample-code
0 likes · 2 min read
PHP rsort() Function – Reverse Sorting an Array