Tagged articles
14 articles
Page 1 of 1
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
php Courses
php Courses
Aug 26, 2023 · Backend Development

PHP strrchr() Function: Syntax, Usage, Examples, and Case Sensitivity

The article explains PHP's strrchr() string function, detailing its syntax, parameters, return values, case‑sensitivity behavior, and provides multiple code examples demonstrating how to locate the last occurrence of a character or substring within a string.

php-tutorialstring-functionsstring-search
0 likes · 5 min read
PHP strrchr() Function: Syntax, Usage, Examples, and Case Sensitivity
php Courses
php Courses
Feb 8, 2021 · Backend Development

Various Methods to Retrieve File Extension in PHP

This article demonstrates seven different PHP techniques for extracting a file's extension, including using substr with strrchr, substr with strrpos, explode with array indexing, end(), pathinfo, and PATHINFO_EXTENSION, providing code examples and brief explanations for each method.

Tutorialfile extensionstring-functions
0 likes · 3 min read
Various Methods to Retrieve File Extension in PHP
Laravel Tech Community
Laravel Tech Community
Sep 25, 2020 · Backend Development

PHP substr_count() Function – Usage, Parameters, and Examples

The PHP substr_count() function counts the number of non‑overlapping occurrences of a substring within a string, optionally starting from a given offset and limiting the search length, and the article explains its signature, parameters, return value, and provides practical code examples.

Backendphp-functionsstring-functions
0 likes · 2 min read
PHP substr_count() Function – Usage, Parameters, and Examples
Laravel Tech Community
Laravel Tech Community
Aug 10, 2020 · Backend Development

PHP stripos() Function: Case‑Insensitive Search for a Substring Position

This article explains the PHP stripos() function, which performs a case‑insensitive search for the first occurrence of a needle string within a haystack string, describes its parameters and return values, and provides a complete example with code illustrating typical usage and edge‑case handling.

BackendTutorialcase-insensitive
0 likes · 3 min read
PHP stripos() Function: Case‑Insensitive Search for a Substring Position
Laravel Tech Community
Laravel Tech Community
Aug 9, 2020 · Backend Development

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

This article explains the PHP stristr() function—the case‑insensitive version of strstr—including its syntax, parameter details, return behavior, and three illustrative code examples demonstrating typical usage scenarios. It also clarifies the effect of the optional before_needle flag and shows how to handle cases where the needle is not found.

Backendcase-insensitive-searchphp-functions
0 likes · 3 min read
PHP stristr() Function: Syntax, Parameters, Return Value, and Examples