substr
substr — Return part of a string.Description
substr( string $string, int $offset, ?int $length = null ): stringReturns the portion of string specified by the offset and length parameters.
Parameters
Return Values
Returns the extracted part of string; or false on failure, or an empty string.More information about substr on official PHP documentation site
substr - Popular snippets
- PHP 8.1 / get_defined_vars substr printf
last run:
2023-10-31 14:43:12
15
- PHP 8.0 / date strtotime substr print_r
last run:
2022-06-01 19:23:57
11
- PHP 8.0 / explode preg_match substr strpos
last run:
2022-02-11 21:10:03
11
- / PostgreSQL 10 Bookings (ReadOnly) substr strtoupper str_shuffle
last run:
2024-07-06 13:55:36
10
- PHP 8.1 / str_shuffle substr print_r
last run:
2022-11-13 07:45:54
10
- PHP 8.1 / mb_strlen substr print_r
last run:
2023-08-17 14:09:17
9
- PHP 7.4 / substr strpos
last run:
2023-06-28 11:01:30
8
- PHP 8.2 / md5 explode substr
last run:
2023-06-15 08:30:51
8
- PHP 8.1 / strlen substr strrev str_split
last run:
2023-12-12 04:17:41
5
- PHP 8.1 / substr
last run:
2022-12-10 20:00:14
5
substr - New snippets
-
PHP 8.1 / MariaDB 11.4 dirname var_dump substr
added at:
2025-04-23 04:09:15
1
-
PHP 8.1 / MariaDB 11.4 dirname var_dump substr
added at:
2025-04-23 04:08:59
1
-
PHP 8.1 / MariaDB 11.4 var_dump substr
added at:
2025-04-23 04:06:21
1
-
PHP 8.3 / MS SQL Server 2022 substr printf
added at:
2025-04-21 23:08:13
1
-
PHP 8.3 / MS SQL Server 2022 substr str_replace printf
added at:
2025-04-21 23:06:36
1
-
PHP 8.3 / MS SQL Server 2022 substr str_replace printf
added at:
2025-04-21 23:06:16
1
-
PHP 8.3 / MS SQL Server 2022 substr str_replace printf
added at:
2025-04-21 22:56:38
1
-
PHP 8.3 / MS SQL Server 2022 substr str_replace printf print_r
added at:
2025-04-21 22:53:26
1
-
PHP 8.3 / MS SQL Server 2022 substr str_replace printf nl2br print_r
added at:
2025-04-21 22:52:52
1
-
PHP 8.3 / MS SQL Server 2022 substr str_replace printf nl2br print_r
added at:
2025-04-21 22:52:43
1