wp_html_split()
Separate HTML elements and comments from the text.
Uses: get_html_split_regex()
1 time — 0.000167 sec (fast) | 50000 times — 0.14 sec (very fast) | PHP 7.1.11, WP 4.9.8
No Hooks.
Return
String[]
. Array of the formatted text.
Usage
wp_html_split( $input );
- $input(string) (required)
- The text which has to be formatted.
Changelog
Since 4.2.4 | Introduced. |
Code of wp_html_split() wp html split WP 6.0
function wp_html_split( $input ) { return preg_split( get_html_split_regex(), $input, -1, PREG_SPLIT_DELIM_CAPTURE ); }