WordPress at a glance

wp_parse_str() WP 1.0

Parses a string into variables to be stored in an array.

Basis of: wp_parse_args()
1 time = 0.000001s = speed of light | 50000 times = 0.07s = speed of light | PHP 7.3.12, WP 5.3.2
Hooks from the function
Return

Null. Nothing.

Usage

wp_parse_str( $string, $array );
$string(string) (required)
The string to be parsed.
$array(array) (required) (passed by reference — &)
Variables will be stored in this array.

Changelog

Since 2.2.1 Introduced.

Code of wp_parse_str() WP 5.5.1

<?php
function wp_parse_str( $string, &$array ) {
	parse_str( $string, $array );

	/**
	 * Filters the array of variables derived from a parsed string.
	 *
	 * @since 2.3.0
	 *
	 * @param array $array The array populated with variables.
	 */
	$array = apply_filters( 'wp_parse_str', $array );
}

From tag: PHP analogues (PHP functions replacement)

More from tag: Supporting (helper utility auxiliary)

More from category: Helper Functions

No comments
    Log In . Register