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 7.4 / MariaDB 11.4 trim preg_match_all print_r preg_replace str_replace preg_match
added at:
2025-03-06 18:20:52
1
-
PHP 7.4 / MariaDB 11.4 trim preg_match_all print_r preg_replace str_replace preg_match
added at:
2025-03-06 18:20:13
1
-
PHP 7.4 / MariaDB 11.4 trim preg_match_all print_r preg_replace str_replace preg_match
added at:
2025-03-06 18:20:08
1
-
PHP 7.4 / MariaDB 11.4 trim preg_match_all print_r preg_replace str_replace preg_match
added at:
2025-03-06 18:19:28
1
-
PHP 7.4 / MariaDB 11.4 trim preg_match_all print_r preg_replace str_replace preg_match
added at:
2025-03-06 18:19:15
1
-
PHP 7.4 / MariaDB 11.4 trim preg_match_all explode print_r preg_replace
added at:
2025-03-06 18:08:07
1
-
PHP 7.4 / MariaDB 11.4 trim preg_match_all explode print_r preg_replace
added at:
2025-03-06 18:07:56
1
-
PHP 7.4 / MariaDB 11.4 trim preg_match_all print_r preg_replace str_replace preg_match
added at:
2025-03-06 18:03:25
1
-
PHP 7.4 / MariaDB 11.4 trim preg_match_all print_r preg_replace str_replace preg_match
added at:
2025-03-06 17:05:44
3
-
PHP 7.4 / MariaDB 11.4 trim preg_match_all print_r preg_replace str_replace preg_match
added at:
2025-03-06 17:04:45
1