Tagged articles
242 articles
Page 2 of 3
php Courses
php Courses
Apr 23, 2024 · Backend Development

Using PHP explode() to Split Strings into Arrays

This article explains how to use PHP's built-in explode() function to split strings into arrays, covering syntax, optional limit parameter, and multiple examples including comma-separated lists, space-separated words, and a note on using str_split for character-level splitting.

ArrayBackendPHP
0 likes · 4 min read
Using PHP explode() to Split Strings into Arrays
php Courses
php Courses
Apr 22, 2024 · Backend Development

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

This article explains how PHP's implode() function joins array elements into a string, covering its syntax, basic usage with custom delimiters, handling of nested arrays, and the special case of omitting the glue parameter, illustrated with clear code examples.

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

Using PHP sort() Function to Sort Arrays in Ascending Order

This article explains how to use PHP's built-in sort() function to sort arrays in ascending order, covering syntax, parameters, return values, and practical examples for both string and numeric arrays, including code snippets and output demonstrations.

ArrayPHPalgorithm
0 likes · 3 min read
Using PHP sort() Function to Sort Arrays in Ascending Order
php Courses
php Courses
Mar 27, 2024 · Backend Development

Using PHP explode() to Split Strings into Arrays

This article explains the PHP explode() function, its syntax and parameters, and provides three practical examples showing how to split strings by spaces, commas with a limit, and empty strings, illustrating the resulting arrays and typical use cases.

ArrayPHPexplode
0 likes · 4 min read
Using PHP explode() to Split Strings into Arrays
php Courses
php Courses
Mar 25, 2024 · Backend Development

Using PHP str_split to Split Strings into Character Arrays

This article explains how to use PHP's str_split function to split strings into character arrays, covering basic syntax, optional split length, and examples including simple splitting, fixed-length chunks, and handling multibyte UTF-8 characters.

ArrayPHPString Manipulation
0 likes · 4 min read
Using PHP str_split to Split Strings into Character Arrays
php Courses
php Courses
Mar 18, 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 single string, demonstrates its default behavior and custom separator usage with clear code examples, and shows the resulting output for both comma‑separated and hyphen‑separated strings.

ArrayPHPString
0 likes · 3 min read
Using PHP implode() to Join Array Elements into a String
php Courses
php Courses
Mar 7, 2024 · Backend Development

How to Randomly Shuffle an Array in PHP Using the shuffle Function

This article explains the PHP shuffle function, its syntax, how it directly modifies an array to randomize element order, provides example code with output, and discusses important considerations such as preserving the original array and handling associative or multidimensional arrays.

ArrayPHPShuffle
0 likes · 3 min read
How to Randomly Shuffle an Array in PHP Using the shuffle Function
php Courses
php Courses
Feb 18, 2024 · Backend Development

Using PHP array_shift() to Remove the First Element from an Array

This article explains the PHP array_shift() function, shows its syntax, demonstrates how it removes and returns the first element of both indexed and associative arrays, and highlights that the original array is re‑indexed after the operation.

Arrayarray_shiftassociative array
0 likes · 4 min read
Using PHP array_shift() to Remove the First Element from an Array
php Courses
php Courses
Feb 7, 2024 · Backend Development

Using PHP's array_replace_recursive() Function to Merge Arrays Recursively

This article explains PHP's array_replace_recursive() function, detailing its syntax, recursive merging behavior, example usage with code snippets, output interpretation, and important considerations such as key overwriting and differences from array_merge_recursive(), providing developers with a practical guide for combining arrays.

ArrayRecursionphp-functions
0 likes · 4 min read
Using PHP's array_replace_recursive() Function to Merge Arrays Recursively
php Courses
php Courses
Feb 6, 2024 · Backend Development

Using PHP in_array() Function: Syntax, Parameters, and Practical Examples

This article explains the PHP in_array() function, covering its syntax, parameters, and three practical examples that demonstrate checking for values, using strict type comparison, and retrieving keys from associative arrays, helping developers efficiently handle array operations.

Arrayin_arrayphp-functions
0 likes · 4 min read
Using PHP in_array() Function: Syntax, Parameters, and Practical Examples
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.

ArrayPHPTutorial
0 likes · 5 min read
How to Use PHP's array_fill() Function to Fill Arrays
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Feb 5, 2024 · Frontend Development

Lesser‑Known but Useful ES6 Features and Techniques

This article introduces several relatively obscure yet practical ES6 features—including Object.entries/Object.fromEntries, Symbol, WeakMap/WeakSet, Promise.allSettled, BigInt, Array.of/Array.from, and the .at and flat methods—explaining their purpose and providing code examples for each.

ArrayBIGINTJavaScript
0 likes · 8 min read
Lesser‑Known but Useful ES6 Features and Techniques
php Courses
php Courses
Jan 27, 2024 · Backend Development

Understanding PHP's array_merge_recursive() Function

This article explains the PHP array_merge_recursive() function, its syntax, parameters, return values, usage examples with code, and important considerations when merging multidimensional arrays, highlighting how duplicate keys are combined into arrays.

ArrayBackendRecursion
0 likes · 4 min read
Understanding PHP's array_merge_recursive() Function
php Courses
php Courses
Jan 23, 2024 · Backend Development

Using PHP array_key_exists() to Check for Key Existence in Arrays

This article explains how PHP's array_key_exists() function checks whether a specific key exists in an array, compares it with isset(), and provides clear code examples demonstrating both functions with different key values, including null.

ArrayBackendfunction
0 likes · 5 min read
Using PHP array_key_exists() to Check for Key Existence in Arrays
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.

ArrayBackendPHP
0 likes · 4 min read
Using PHP implode() to Join Array Elements into a String
php Courses
php Courses
Dec 25, 2023 · Backend Development

How to Randomly Shuffle Array Elements Using PHP's shuffle Function

This article explains how to use PHP's built-in shuffle() function to randomly reorder array elements, covering its syntax, return value, example code for indexed and associative arrays, handling of multidimensional arrays, and important considerations such as in‑place modification and preserving original data.

ArrayBackendPHP
0 likes · 3 min read
How to Randomly Shuffle Array Elements Using PHP's shuffle Function
php Courses
php Courses
Dec 8, 2023 · Backend Development

Using PHP shuffle() to Randomly Rearrange Array Elements

This article explains PHP's shuffle() function, its syntax, behavior, return value, and demonstrates how it randomizes both indexed and associative arrays with code examples, highlighting that it modifies the original array and reindexes non‑sequential keys.

ArrayBackendShuffle
0 likes · 5 min read
Using PHP shuffle() to Randomly Rearrange Array Elements
php Courses
php Courses
Dec 6, 2023 · Backend Development

Using PHP's array() Function to Create Indexed and Associative Arrays

This article explains PHP's built‑in array() function, demonstrating how to create both indexed and associative arrays with clear examples, code snippets, and important usage notes for developers. It also covers mixed and nested arrays, parameter rules, and common pitfalls to help you write robust PHP code.

ArrayBackendPHP
0 likes · 6 min read
Using PHP's array() Function to Create Indexed and Associative Arrays
php Courses
php Courses
Dec 5, 2023 · Backend Development

Understanding and Using PHP's in_array() Function

This article explains PHP's in_array() function, detailing its syntax, parameters, and return values, and provides multiple code examples demonstrating basic usage, strict type comparison, and practical tips for efficiently checking the presence of values in arrays.

ArrayBackendPHP
0 likes · 5 min read
Understanding and Using PHP's in_array() Function
Wu Shixiong's Large Model Academy
Wu Shixiong's Large Model Academy
Nov 12, 2023 · Fundamentals

How to Compute the Shortest Distance on a Circular Road Efficiently

Given a circular road with n stations and the distances between each consecutive pair, this article explains how to determine the minimal travel distance between any two stations by evaluating both clockwise and counter‑clockwise routes, providing problem details, examples, solution logic, reference implementations in Python, Java, and C++, and complexity analysis.

Arrayalgorithmc++
0 likes · 8 min read
How to Compute the Shortest Distance on a Circular Road Efficiently
php Courses
php Courses
Nov 9, 2023 · Backend Development

Using PHP's array() Function to Create Indexed and Associative Arrays

This article explains PHP's built‑in array() function, demonstrates how to create both indexed and associative arrays with clear code examples, outlines important usage notes, and provides additional sample snippets to help developers master array creation in backend development.

ArrayTutorial
0 likes · 5 min read
Using PHP's array() Function to Create Indexed and Associative Arrays
php Courses
php Courses
Oct 27, 2023 · Backend Development

Using PHP extract() Function to Convert Array Keys to Variables

This article explains how PHP's extract() function converts array key‑value pairs into variables, covering its syntax, flag options, prefix usage, practical examples, and important safety considerations for developers, including behavior flags like EXTR_OVERWRITE, EXTR_SKIP, and how to avoid variable name conflicts.

ArrayExtractVariables
0 likes · 4 min read
Using PHP extract() Function to Convert Array Keys to Variables
php Courses
php Courses
Aug 31, 2023 · Backend Development

Understanding PHP implode() Function: Syntax, Examples, and Use Cases

This article explains PHP's implode() function, covering its syntax, basic usage, and practical examples such as creating comma‑separated strings, building SQL IN clauses, and generating HTML lists, while providing clear code snippets for each scenario.

ArrayCode Examplesimplode
0 likes · 5 min read
Understanding PHP implode() Function: Syntax, Examples, and Use Cases
php Courses
php Courses
Aug 11, 2023 · Backend Development

Using PHP natsort() for Natural Sorting of Arrays

This article explains how PHP's natsort() function performs natural sorting on arrays, compares it with regular sort(), demonstrates case‑sensitive and case‑insensitive examples using natsort() and natcasesort(), and provides practical code snippets for developers.

ArrayPHPnatcasesort
0 likes · 5 min read
Using PHP natsort() for Natural Sorting of Arrays
php Courses
php Courses
Aug 4, 2023 · Backend Development

Using PHP end() Function to Retrieve the Last Element of an Array

This article explains the PHP end() function, its syntax, return values, and demonstrates how to use it with both indexed and associative arrays, including combined usage with reset() for reverse traversal, providing clear code examples for each scenario.

ArrayPHPTutorial
0 likes · 5 min read
Using PHP end() Function to Retrieve the Last Element of an Array
php Courses
php Courses
Aug 4, 2023 · Backend Development

Understanding PHP reset() Function: Syntax, Examples, and Usage

This article explains PHP's reset() function, its syntax, behavior, and provides multiple code examples demonstrating how to retrieve the first array element, iterate through arrays, and combine it with end() to access both first and last elements.

ArrayPHPTutorial
0 likes · 4 min read
Understanding PHP reset() Function: Syntax, Examples, and Usage
php Courses
php Courses
Aug 3, 2023 · Backend Development

Using PHP's next() Function to Traverse Arrays

This article explains PHP's built‑in next() function, its syntax, how it moves an array's internal pointer, returns element values or false, supports optional circular traversal, provides usage examples, and mentions related pointer functions for effective array handling.

ArrayTraversal__next__
0 likes · 4 min read
Using PHP's next() Function to Traverse Arrays
php Courses
php Courses
Aug 3, 2023 · Backend Development

Using the PHP prev() Function: Syntax, Examples, and Tips

This article explains PHP's prev() function, detailing its syntax, usage examples—including basic calls, resetting pointers with reset(), reverse array traversal with while loops—and important considerations such as boundary behavior, providing clear code snippets for developers.

ArrayPHPpointer
0 likes · 5 min read
Using the PHP prev() Function: Syntax, Examples, and Tips
php Courses
php Courses
Aug 2, 2023 · Backend Development

Understanding and Using PHP's key() Function

This article explains PHP's key() function, its syntax, how it determines the current array pointer's key, the possible return values, and provides multiple code examples demonstrating its behavior with indexed, associative, and empty arrays.

Arraykey functionphp-tutorial
0 likes · 5 min read
Understanding and Using PHP's key() Function
php Courses
php Courses
Aug 1, 2023 · Backend Development

Using PHP's array_count_values() Function to Count Value Occurrences

This article explains the PHP array_count_values() function, its syntax, parameters, return values, and provides clear code examples showing how to count the frequency of values in arrays, along with important usage notes and a brief conclusion.

ArrayTutorialcount-values
0 likes · 4 min read
Using PHP's array_count_values() Function to Count Value Occurrences
php Courses
php Courses
Aug 1, 2023 · Backend Development

Using PHP shuffle() Function to Randomly Reorder Array Elements

This article explains the PHP shuffle() function, detailing its syntax, return behavior, usage examples, and important considerations such as its effect on the original array, limitations with associative arrays, and handling of duplicate elements, providing a practical code demonstration.

ArrayPHPShuffle
0 likes · 3 min read
Using PHP shuffle() Function to Randomly Reorder Array Elements
php Courses
php Courses
Jul 24, 2023 · Backend Development

Using PHP's array_key_exists() Function to Check for Key Presence in Arrays

This article explains how the PHP function array_key_exists() works, shows its parameters, and provides multiple code examples for checking single or multiple keys in one or several arrays, highlighting its usefulness for developers handling associative arrays.

Arrayarray_key_existscode-example
0 likes · 4 min read
Using PHP's array_key_exists() Function to Check for Key Presence in Arrays
php Courses
php Courses
Jul 11, 2023 · Backend Development

How to Get Array Length in PHP Using count() and sizeof()

This article explains how to determine the length of one‑dimensional and multi‑dimensional arrays in PHP using the count() and sizeof() functions, shows code examples, discusses the two optional parameters of count(), and provides guidance on handling empty or undefined arrays.

Array_countsizeof
0 likes · 4 min read
How to Get Array Length in PHP Using count() and sizeof()
php Courses
php Courses
Jul 11, 2023 · Backend Development

How to Count the Number of Keys in a PHP Array

This article explains several PHP techniques—including the count function, array_keys, foreach loops, and end/key combination—to determine how many keys an array contains, providing code examples and explanations for each method.

Array_count
0 likes · 5 min read
How to Count the Number of Keys in a PHP Array
Laravel Tech Community
Laravel Tech Community
Jul 10, 2023 · Backend Development

Implementing Random Double Color Ball Selection in PHP Using Arrays

This article explains how to implement a random Double Color Ball (Shuangseqiu) lottery number generator using PHP arrays, detailing the definition of red and blue ball arrays, random selection with array_rand(), and outputting the results via foreach loops, along with the complete source code.

ArrayBackendLottery
0 likes · 6 min read
Implementing Random Double Color Ball Selection in PHP Using Arrays
php Courses
php Courses
Jul 7, 2023 · Backend Development

Using print_r() and var_dump() to Print Arrays in PHP

This article explains the two primary PHP functions for displaying arrays—print_r() for readable output and var_dump() for detailed type and value information—provides syntax examples, and shows the resulting output of each function.

ArrayBackendPHP
0 likes · 2 min read
Using print_r() and var_dump() to Print Arrays in PHP
php Courses
php Courses
Apr 17, 2023 · Backend Development

Generating SKU Combinations with Cartesian Product in PHP

This article demonstrates how to generate all possible SKU combinations in PHP by using Cartesian product on color, size, and version arrays, includes a full code example and the resulting array output.

ArrayBackendCode Example
0 likes · 3 min read
Generating SKU Combinations with Cartesian Product in PHP
php Courses
php Courses
Apr 3, 2023 · Backend Development

Reindexing PHP Arrays: Using array_values, array_merge, and Manual Loops

This guide explains how to transform a PHP array with non‑sequential keys into a zero‑based sequential array by using the built‑in array_values function, the array_merge function, and a manual foreach loop, providing code examples and output for each method.

ArrayBackendReindex
0 likes · 3 min read
Reindexing PHP Arrays: Using array_values, array_merge, and Manual Loops
Sohu Tech Products
Sohu Tech Products
Jan 11, 2023 · Mobile Development

Deep Dive into Swift Array Implementation and Copy‑On‑Write Mechanics

This article provides a comprehensive, low‑level exploration of Swift's Array type, detailing its memory layout, the SIL generation process, buffer allocation, internal structures such as _ArrayBuffer and _ContiguousArrayStorage, and the copy‑on‑write behavior that governs mutation and reference counting.

ArrayCopy-on-WriteLow-Level Debugging
0 likes · 18 min read
Deep Dive into Swift Array Implementation and Copy‑On‑Write Mechanics
Model Perspective
Model Perspective
Nov 13, 2022 · Fundamentals

Master Numpy: From Arrays to Matrix Operations in Python

This guide introduces Numpy basics, covering installation, array creation, indexing, slicing, universal functions, and matrix operations such as addition, multiplication, inversion, determinants, and eigenvalue analysis, all illustrated with clear Python code examples.

ArrayNumPyUFunc
0 likes · 7 min read
Master Numpy: From Arrays to Matrix Operations in Python
Model Perspective
Model Perspective
Sep 24, 2022 · Fundamentals

Master Numpy: Create Arrays, Perform Operations, and Harness Linear Algebra

This guide introduces Python's Numpy library, covering installation, array creation, indexing, slicing, reshaping, arithmetic operations, universal functions, and linear algebra tools such as matrix generation, multiplication, inversion, determinants, eigenvalues, and eigenvectors, providing code examples for each concept.

ArrayNumPyUFunc
0 likes · 7 min read
Master Numpy: Create Arrays, Perform Operations, and Harness Linear Algebra
Model Perspective
Model Perspective
Jun 3, 2022 · Fundamentals

Master Numpy: From Array Creation to Advanced Matrix Operations

This guide introduces NumPy fundamentals—including installation, array creation, indexing, slicing, universal functions, and linear‑algebra operations—providing concise code examples that demonstrate how to generate, manipulate, and compute with multidimensional arrays and matrices in Python.

ArrayUFunclinear-algebra
0 likes · 7 min read
Master Numpy: From Array Creation to Advanced Matrix Operations
Python Programming Learning Circle
Python Programming Learning Circle
May 4, 2022 · Fundamentals

Common Python Interview Questions and Answers

This article provides concise explanations of ten fundamental Python topics, covering differences between lists and tuples, arrays and lists, append versus extend, equality operators, shallow and deep copying, loop control statements, variable scopes, range versus xrange, decorators, and the concepts of iterators and generators.

ArrayDecoratorIterator
0 likes · 7 min read
Common Python Interview Questions and Answers
IT Services Circle
IT Services Circle
Apr 20, 2022 · Frontend Development

New Non‑Destructive Array Methods in JavaScript: toReversed, toSorted, toSpliced, and with

JavaScript’s upcoming “Change Array by copy” proposal introduces four non‑destructive array methods—.toReversed(), .toSorted(), .toSpliced(), and .with()—which provide immutable alternatives to existing destructive methods, and the article explains their behavior, usage examples, and polyfills while the proposal is in stage 3.

ArrayECMAScriptJavaScript
0 likes · 6 min read
New Non‑Destructive Array Methods in JavaScript: toReversed, toSorted, toSpliced, and with
JavaScript
JavaScript
Apr 15, 2022 · Frontend Development

How to Skip Elements in JavaScript Arrays Using flatMap

This article explains how JavaScript's map, filter, and especially flatMap methods can be used to transform arrays while selectively skipping or removing elements, offering concise code examples that demonstrate replacing separate map‑filter chains with a single flatMap call for cleaner, more efficient array processing.

ArrayMAPfilter
0 likes · 3 min read
How to Skip Elements in JavaScript Arrays Using flatMap
Sohu Tech Products
Sohu Tech Products
Feb 2, 2022 · Mobile Development

Performance Optimization Analysis of Swift Subarray Extraction

This article examines various methods for extracting subarrays in Swift, benchmarking loop‑based copying, range subscripting with map, while loops, and direct memory copying via memcpy, analyzing their execution times, compiler optimizations, and trade‑offs to guide developers toward efficient array handling in performance‑critical applications.

ArrayMemoryCopySwift
0 likes · 16 min read
Performance Optimization Analysis of Swift Subarray Extraction
Alibaba Cloud Developer
Alibaba Cloud Developer
Jul 12, 2021 · Backend Development

How to Compress Large Java int/long Arrays for Massive Memory Savings

This article explains how to reduce memory usage of massive Java int/long arrays by applying real‑time compression, eliminating redundancy, using indexed buckets, offset storage, and a series of low‑level optimizations that boost TPS from dozens to over a thousand while preserving random‑access capabilities.

ArrayMemory Optimizationdata compression
0 likes · 14 min read
How to Compress Large Java int/long Arrays for Massive Memory Savings
Laravel Tech Community
Laravel Tech Community
Jun 24, 2021 · Backend Development

Performance‑Optimized Alternatives to Common PHP Functions

This article presents faster PHP 7.4 alternatives for typical array and string operations—removing duplicates, picking random elements, alphanumeric checks, and substring replacement—backed by benchmark results and additional coding tips for production performance.

ArrayStringoptimization
0 likes · 6 min read
Performance‑Optimized Alternatives to Common PHP Functions
php Courses
php Courses
May 26, 2021 · Backend Development

PHP Interview Questions: Array Merging, Integer Validation, Unicode Case Conversion, File Writability, Permission Handling, Upload Validation, and URL Encoding Differences

This article presents a series of PHP interview questions covering array merging methods, integer validation, Unicode‑compatible case conversion, reliable file‑writability checks, permission‑setting functions, secure image upload verification, and differences between PHP and JavaScript URL encoding, each accompanied by code examples.

ArrayFile I/Ointerview
0 likes · 8 min read
PHP Interview Questions: Array Merging, Integer Validation, Unicode Case Conversion, File Writability, Permission Handling, Upload Validation, and URL Encoding Differences
JavaScript
JavaScript
May 20, 2021 · Frontend Development

Understanding JavaScript’s Math.max: Edge Cases and Array Tricks

This article explains how JavaScript’s Math.max function works, covering typical usage, single‑argument behavior, the surprising -Infinity result when called without arguments, and practical techniques for finding maximum values in arrays, including handling empty arrays.

ArrayInfinityJavaScript
0 likes · 3 min read
Understanding JavaScript’s Math.max: Edge Cases and Array Tricks
Laravel Tech Community
Laravel Tech Community
Mar 19, 2021 · Backend Development

PHP localtime() Function – Retrieve Local Time as an Array

The PHP localtime() function returns the local date and time as an array, optionally associative, mirroring the C library function, and accepts an optional Unix timestamp parameter, with examples showing both numeric and associative array outputs.

Arrayassociative arraydatetime
0 likes · 3 min read
PHP localtime() Function – Retrieve Local Time as an Array
ByteFE
ByteFE
Mar 17, 2021 · Frontend Development

A Comprehensive Guide to JavaScript's Array reduce Method and Its Versatile Applications

This article explains the syntax and behavior of JavaScript's reduce method, compares it with map, forEach, filter and find, and demonstrates numerous practical patterns such as flattening arrays, counting occurrences, grouping by property, deduplication, and finding extrema, all illustrated with clear code examples.

ArrayCode ExamplesJavaScript
0 likes · 10 min read
A Comprehensive Guide to JavaScript's Array reduce Method and Its Versatile Applications
Laravel Tech Community
Laravel Tech Community
Feb 6, 2021 · Backend Development

PHP min() Function: Finding the Minimum Value

This article explains how PHP's min() function determines the smallest value, detailing its behavior with single array arguments versus multiple scalar arguments, describing parameters and return values, and providing clear code examples for common use cases.

ArrayBackendmin function
0 likes · 2 min read
PHP min() Function: Finding the Minimum Value
Laravel Tech Community
Laravel Tech Community
Feb 5, 2021 · Backend Development

Using PHP’s max() Function to Find the Largest Value

This article explains how PHP’s max() function works with both scalar values and arrays, describes its parameters and return value, and provides multiple code examples demonstrating how to retrieve the greatest element in various scenarios.

ArrayBackendComparison
0 likes · 3 min read
Using PHP’s max() Function to Find the Largest Value
php Courses
php Courses
Jan 21, 2021 · Backend Development

Understanding PHP json_encode Output: When Arrays Become Objects

This article explains why PHP's json_encode sometimes returns a JSON object instead of an array, demonstrates several common scenarios, and provides practical code solutions to ensure the desired array format in the resulting JSON.

ArrayJSONencoding
0 likes · 4 min read
Understanding PHP json_encode Output: When Arrays Become Objects
Laravel Tech Community
Laravel Tech Community
Dec 30, 2020 · Backend Development

PHP sort() Function – Sorting Arrays

This article explains the PHP sort() function, its signature, optional sorting flags, parameters, return values, and provides a complete example demonstrating how to sort an array of strings in ascending order and display the sorted results.

ArrayBackendPHP
0 likes · 2 min read
PHP sort() Function – Sorting Arrays
Taobao Frontend Technology
Taobao Frontend Technology
Dec 30, 2020 · Frontend Development

Why Assigning Beyond Array Length Saves Memory in V8

An in‑depth analysis shows why assigning a value at index 99999 in a large JavaScript array triggers V8 to switch from fast to slow (dictionary) mode, dramatically reducing memory usage by expanding capacity and converting holey arrays into a more efficient storage structure.

ArrayJavaScriptMemory Optimization
0 likes · 5 min read
Why Assigning Beyond Array Length Saves Memory in V8
Laravel Tech Community
Laravel Tech Community
Dec 29, 2020 · Backend Development

PHP shuffle() Function – Randomly Shuffle an Array

This article explains the PHP shuffle() function, describing its purpose of randomly reordering array elements, the required array parameter, the boolean return value, and provides a complete example with sample output to illustrate its usage.

ArrayBackendPHP
0 likes · 2 min read
PHP shuffle() Function – Randomly Shuffle an Array
Laravel Tech Community
Laravel Tech Community
Dec 25, 2020 · Backend Development

PHP prev() Function: Move an Array’s Internal Pointer Backward

The PHP prev() function moves an array’s internal pointer one step backward, returning the previous element’s value or FALSE when no more elements exist, and is demonstrated with a complete example showing how to iterate and retrieve values using prev, next, and current.

ArrayBackendPHP
0 likes · 2 min read
PHP prev() Function: Move an Array’s Internal Pointer Backward
Laravel Tech Community
Laravel Tech Community
Dec 24, 2020 · Backend Development

PHP next() Function: Advancing the Internal Array Pointer

The PHP next() function moves an array's internal pointer forward by one position, returning the value of the next element or FALSE when no more elements exist, and is demonstrated with sample code showing how to retrieve successive items from an array.

ArrayBackendPHP
0 likes · 2 min read
PHP next() Function: Advancing the Internal Array Pointer
Laravel Tech Community
Laravel Tech Community
Dec 23, 2020 · Backend Development

Using PHP's natsort() Function for Natural Order Array Sorting

This article explains PHP's natsort() function, which performs natural order sorting on arrays while preserving key/value associations, describes its parameters and return values, and provides a complete example comparing standard sorting with natural sorting to illustrate the differences in output.

ArrayBackendPHP
0 likes · 2 min read
Using PHP's natsort() Function for Natural Order Array Sorting
Laravel Tech Community
Laravel Tech Community
Dec 21, 2020 · Backend Development

Using list() to Assign Array Values to Variables in PHP

This article explains the PHP list() language construct, its syntax and return value, and provides detailed examples showing how to unpack array elements into variables, handle partial assignments, skip elements, and demonstrates that list() cannot operate on strings.

ArrayBackendList
0 likes · 2 min read
Using list() to Assign Array Values to Variables in PHP
Laravel Tech Community
Laravel Tech Community
Dec 20, 2020 · Backend Development

Using ksort() to Sort Arrays by Key in PHP

This article explains the PHP ksort() function, which sorts an associative array by its keys while preserving key‑value relationships, describes its parameters and return values, and provides a complete example with code and expected output.

ArrayBackendPHP
0 likes · 2 min read
Using ksort() to Sort Arrays by Key in PHP
Laravel Tech Community
Laravel Tech Community
Dec 8, 2020 · Backend Development

Creating an Array with the array() Function in PHP

This article explains how to create arrays in PHP using the array() function, detailing syntax, parameter description, optional trailing commas, and provides a comprehensive example with nested arrays and the resulting output.

ArrayBackendexample
0 likes · 2 min read
Creating an Array with the array() Function in PHP