WordPress at a glance

wp_html_split() WP 1.0

Separate HTML elements and comments from the text.

Works based on: get_html_split_regex()
✈ 1 time = 0.000167s = fast | 50000 times = 0.14s = very fast | PHP 7.1.11, WP 4.9.8

No Hooks.

Return

Array. 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-includes/formatting.php WP 5.2.4

<?php
function wp_html_split( $input ) {
	return preg_split( get_html_split_regex(), $input, -1, PREG_SPLIT_DELIM_CAPTURE );
}

Related Functions

From category: Helper Functions

No comments
    Hello, !     Log In . Register