preg_replace
preg_replace — Perform a regular expression search and replace.Description
preg_replace( string|array $pattern, string|array $replacement, string|array $subject, int $limit = -1, int &$count = null ): string|array|nullSearches subject for matches to pattern and replaces them with replacement.
Parameters
Return Values
preg_replace() returns an array if the subject parameter is an array, or a string otherwise. If matches are found, the new subject will be returned, otherwise subject will be returned unchanged or null if an error occurred.More information about preg_replace on official PHP documentation site
preg_replace - Popular snippets
- PHP 8.0 / preg_match preg_replace
last run:
2021-01-12 14:29:49
21
- PHP 8.0 / preg_replace
last run:
2024-07-01 11:12:28
15
- PHP 8.1 / preg_match_all preg_replace
last run:
2022-05-26 14:12:50
11
- PHP 8.1 / preg_replace str_split array_reverse
last run:
2024-11-22 10:36:01
10
- PHP 8.1 / preg_replace
last run:
2024-07-08 08:48:06
10
- PHP 8.1 / preg_replace
last run:
2024-07-08 08:47:14
10
- PHP 8.0 / array_rand range preg_match preg_replace
last run:
2024-03-09 14:37:00
9
- PHP 8.0 / preg_replace preg_match print_r
last run:
2022-03-31 23:55:24
9
- PHP 8.0 / preg_replace
last run:
2022-10-18 15:23:13
8
- PHP 7.4 / microtime preg_replace round var_dump array_sum
last run:
2021-05-02 15:53:46
8
preg_replace - New snippets
-
PHP 8.1 / MariaDB 11.4 extract var_dump preg_replace uniqid date
added at:
2025-06-12 07:11:31
1
-
PHP 8.1 / MariaDB 11.4 extract var_dump preg_replace uniqid date
added at:
2025-06-12 07:11:14
1
-
PHP 8.1 / MariaDB 11.4 extract var_dump preg_replace uniqid date strtotime
added at:
2025-06-12 07:11:04
1
-
PHP 8.1 / MariaDB 11.4 extract var_dump preg_replace uniqid
added at:
2025-06-03 06:48:11
3
-
PHP 8.1 / MariaDB 11.4 extract var_dump preg_replace uniqid
added at:
2025-06-03 03:31:31
1
-
PHP 8.1 / MariaDB 11.4 extract var_dump preg_replace uniqid
added at:
2025-06-03 03:31:12
1
-
PHP 8.1 / MariaDB 11.4 extract var_dump preg_replace uniqid
added at:
2025-06-03 03:30:57
1
-
PHP 8.1 / MariaDB 11.4 extract var_dump preg_replace uniqid
added at:
2025-06-03 03:30:43
1
-
PHP 8.1 / MariaDB 11.4 extract var_dump preg_replace uniqid
added at:
2025-06-03 01:48:22
1
-
PHP 8.1 / MariaDB 11.4 extract var_dump preg_replace uniqid
added at:
2025-06-03 01:48:14
1