Tag

string-functions

1 views collected around this technical thread.

php中文网 Courses
php中文网 Courses
Dec 26, 2024 · Backend Development

Using PHP basename() Function to Retrieve File Names from Paths

This article explains the PHP basename() function, detailing its syntax, parameters, and behavior, and demonstrates its usage through multiple code examples that extract file names from absolute and relative paths, optionally removing specified suffixes, while noting OS-specific considerations.

backendbasenamefile path
0 likes · 5 min read
Using PHP basename() Function to Retrieve File Names from Paths
php中文网 Courses
php中文网 Courses
Jun 20, 2024 · Backend Development

Key New Features and Improvements in PHP 8

The article provides a comprehensive overview of PHP 8’s major enhancements—including an expanded type system, match expressions, the null‑safe operator, attributes, a JIT compiler, and string/array improvements—illustrated with code examples and notes on upcoming PHP 8.4 releases.

Backend DevelopmentJIT CompilerMatch Expression
0 likes · 8 min read
Key New Features and Improvements in PHP 8
Java Tech Enthusiast
Java Tech Enthusiast
Jun 10, 2024 · Databases

Common MySQL String Functions

MySQL offers a comprehensive set of string functions—including lower, upper, concat, substring/substr, length, char_length, instr, lpad, rpad, trim (with leading, trailing, both options), replace, repeat, reverse, and format—that enable case conversion, concatenation, extraction, padding, trimming, substitution, repetition, reversal, and numeric formatting of textual data.

DatabaseMySQLSQL
0 likes · 6 min read
Common MySQL String Functions
php中文网 Courses
php中文网 Courses
May 8, 2024 · Backend Development

How to Use PHP's basename() Function to Extract File Names from Paths

This article explains the PHP basename() function, detailing its syntax, parameters, and behavior across operating systems, and demonstrates its usage through three practical examples that show how to retrieve file names from absolute and relative paths, with and without suffix removal.

backendbasenamefile path
0 likes · 4 min read
How to Use PHP's basename() Function to Extract File Names from Paths
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Apr 13, 2024 · Databases

Comprehensive Guide to MySQL String Functions

This article provides an in‑depth overview of MySQL string functions, covering concatenation, length, position, replacement, conversion, encryption, comparison, generation, and their syntax and usage examples, helping developers manipulate textual data efficiently in database operations.

DatabaseMySQLSQL
0 likes · 18 min read
Comprehensive Guide to MySQL String Functions
php中文网 Courses
php中文网 Courses
Jan 4, 2024 · Backend Development

Common PHP Functions for Searching and Filtering Data

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

FilterPHPSearch
0 likes · 4 min read
Common PHP Functions for Searching and Filtering Data
php中文网 Courses
php中文网 Courses
Nov 28, 2023 · Backend Development

Common PHP String Functions and Usage Tips

This article introduces essential PHP string functions—including length, substring, search, replace, trimming, case conversion, splitting, joining, regular expressions, and comparison—explaining their syntax, providing code examples, and showing practical scenarios for efficient string manipulation in backend development.

PHPprogrammingstring-functions
0 likes · 6 min read
Common PHP String Functions and Usage Tips
php中文网 Courses
php中文网 Courses
Nov 16, 2023 · Backend Development

Using PHP 8.1 str_starts_with() Function: Syntax, Examples, and Case Sensitivity

PHP 8.1 introduces the str_starts_with() function, which checks if a string begins with a given substring, returning true or false; this article explains its syntax, demonstrates basic and URL-check examples, highlights case‑sensitivity, and mentions the case‑insensitive variant str_starts_with_ci().

Backend DevelopmentPHPPHP8
0 likes · 3 min read
Using PHP 8.1 str_starts_with() Function: Syntax, Examples, and Case Sensitivity
php中文网 Courses
php中文网 Courses
Nov 4, 2023 · Backend Development

Common PHP String Functions and Usage Examples

This tutorial introduces PHP's most commonly used string functions, categorizes them by purpose, and provides clear example code demonstrating how to retrieve string information, process, and convert strings, helping developers improve efficiency and code quality.

Backend DevelopmentPHPTutorial
0 likes · 4 min read
Common PHP String Functions and Usage Examples
php中文网 Courses
php中文网 Courses
Oct 16, 2023 · Backend Development

PHP basename() Function: Syntax, Parameters, Return Value, Examples, and Notes

The article explains the PHP basename() function, detailing its syntax, required and optional parameters, return value, practical examples, special handling of directory paths and suffixes, and important usage notes for both Windows and Unix environments.

Backend DevelopmentPHPbasename
0 likes · 3 min read
PHP basename() Function: Syntax, Parameters, Return Value, Examples, and Notes
php中文网 Courses
php中文网 Courses
Sep 7, 2023 · Backend Development

PHP strtolower() Function: Syntax, Parameters, Return Value, Examples, and Usage Tips

The article explains PHP's strtolower() function, detailing its syntax, parameters, return value, and providing multiple code examples—including full string conversion, partial conversion, word-level manipulation, and multibyte handling—while also noting important considerations for case sensitivity and non‑alphabetic characters.

PHPprogrammingstring-functions
0 likes · 5 min read
PHP strtolower() Function: Syntax, Parameters, Return Value, Examples, and Usage Tips
php中文网 Courses
php中文网 Courses
Aug 30, 2023 · Backend Development

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

This article explains PHP's strcspan() function, detailing its syntax, parameters, return value, and provides three practical code examples that demonstrate how it counts consecutive characters in a string based on a given character list.

PHPcode examplesstrcspan
0 likes · 5 min read
Understanding PHP strcspan() Function: Syntax, Usage, and Examples
php中文网 Courses
php中文网 Courses
Aug 28, 2023 · Backend Development

Understanding PHP strrpos() Function: Syntax, Parameters, Return Values, and Practical Examples

This article explains the PHP strrpos() function, detailing its syntax, parameters, return values, and providing multiple code examples that demonstrate how to locate the last occurrence of characters or substrings within a string, including handling of offsets and missing matches.

Backend DevelopmentPHPTutorial
0 likes · 6 min read
Understanding PHP strrpos() Function: Syntax, Parameters, Return Values, and Practical Examples
php中文网 Courses
php中文网 Courses
Aug 25, 2023 · Backend Development

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

The article explains PHP's strchr() function, detailing its syntax, parameters, return values, and providing code examples for finding characters, substrings, retrieving text before a needle, and handling cases where the needle is absent.

Backend DevelopmentPHPcode examples
0 likes · 4 min read
PHP strchr() Function: Syntax, Parameters, Return Values, and Usage Examples
php中文网 Courses
php中文网 Courses
Aug 21, 2023 · Backend Development

Using PHP mb_strlen() to Accurately Measure Multibyte String Lengths

This article explains how to use PHP's mb_strlen() function to accurately measure string lengths, handle multibyte characters, specify encodings, retrieve byte counts, count character occurrences, and work with different language encodings, providing clear code examples for each case.

Backend Developmentencodingmb_strlen
0 likes · 4 min read
Using PHP mb_strlen() to Accurately Measure Multibyte String Lengths
php中文网 Courses
php中文网 Courses
Aug 19, 2023 · Backend Development

Using PHP strlen() Function: Basics, Multibyte and Special Character Handling

This article explains the PHP strlen() function, demonstrates its basic usage with code examples, discusses limitations with multibyte and special characters, and shows how to use mb_strlen() to correctly measure string length in various encoding scenarios.

Backend DevelopmentPHPmb_strlen
0 likes · 5 min read
Using PHP strlen() Function: Basics, Multibyte and Special Character Handling
php中文网 Courses
php中文网 Courses
Jul 12, 2023 · Backend Development

Using strpos() and strrpos() Functions to Detect Substrings in PHP

These PHP tutorials demonstrate how to use the strpos() and strrpos() functions to detect the presence and position of characters in strings, explaining return values, providing complete code examples, and offering additional learning resources for backend development.

Backend DevelopmentPHPstring-functions
0 likes · 4 min read
Using strpos() and strrpos() Functions to Detect Substrings in PHP
php中文网 Courses
php中文网 Courses
Jun 30, 2023 · Backend Development

10 Essential PHP String Manipulation Functions with Examples

This article introduces ten essential PHP string manipulation functions—including substr, str_replace, implode, strpos, and sprintf—explaining their purpose and providing clear code examples that demonstrate how to extract, replace, concatenate, search, split, trim, and format strings efficiently in PHP development.

PHPbackendimplode
0 likes · 5 min read
10 Essential PHP String Manipulation Functions with Examples
php中文网 Courses
php中文网 Courses
Mar 30, 2021 · Backend Development

Using PHP substr_count() and strpos() Functions to Count and Locate Substrings

This article explains how to use PHP's substr_count() and strpos() functions to count occurrences of a substring and find its position within a string, providing syntax details, parameter descriptions, and complete code examples with expected output.

PHPbackendstring-functions
0 likes · 4 min read
Using PHP substr_count() and strpos() Functions to Count and Locate Substrings
php中文网 Courses
php中文网 Courses
Feb 20, 2021 · Backend Development

Masking Chinese Mobile Numbers in PHP Using substr_replace, preg_replace, and substr

This tutorial explains how to conceal 11‑digit Chinese mobile numbers in PHP by demonstrating three approaches: using substr_replace, applying a regular‑expression with preg_replace, and concatenating substr results, each illustrated with complete code examples.

Backend DevelopmentPHPPhone Number Masking
0 likes · 3 min read
Masking Chinese Mobile Numbers in PHP Using substr_replace, preg_replace, and substr