json_decode( string $string, bool $assoc_array = false )


Description Description


Parameters Parameters

$string

(string) (Required)

$assoc_array

(bool) (Optional)

Default value: false


Top ↑

Return Return

(object|array)


Top ↑

Source Source

File: wp-includes/compat.php

	function json_decode( $string, $assoc_array = false ) {
		global $wp_json;

		if ( ! ($wp_json instanceof Services_JSON ) ) {
			require_once( ABSPATH . WPINC . '/class-json.php' );
			$wp_json = new Services_JSON();
		}

		$res = $wp_json->decode( $string );
		if ( $assoc_array )
			$res = _json_decode_object_helper( $res );
		return $res;
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.