src/WordpressUtility.php
public static function utf8_json_encode($arr, $options = 0, $depth = 512) {
		// NOTE(Jake): Might be able to get more speed out of this (if need be) by making it just json_encode
		//			   and if it fails with JSON_ERROR_UTF8, then do the recursive walk
		$utf8_arr = $arr;
		array_walk_recursive($utf8_arr, array(__CLASS__, '_utf8_json_encode_recursive'));
		$result = json_encode($utf8_arr, $options, $depth);
		return $result;
	}
public static function utf8_json_encode($arr, $options = 0, $depth = 512) {
		// NOTE(Jake): Might be able to get more speed out of this (if need be) by making it just json_encode
		//			   and if it fails with JSON_ERROR_UTF8, then do the recursive walk
		$utf8_arr = $arr;
		array_walk_recursive($utf8_arr, array(__CLASS__, '_utf8_json_encode_recursive'));
		$result = json_encode($utf8_arr, $options, $depth);
		return $result;
	}
public static function utf8_json_encode ( $ arr , $ options = 0 , $ depth = 512 ) { // NOTE(Jake): Might be able to get more speed out of this (if need be) by making it just json_encode //			   and if it fails with JSON_ERROR_UTF8, then do the recursive walk $ utf8_arr = $ arr ; array_walk_recursive ( $ utf8_arr , array ( __CLASS__ , '_utf8_json_encode_recursive' ) ) ; $ result = json_encode ( $ utf8_arr , $ options , $ depth ) ; return $ result ; }
Encodes an array of data to be UTF8 over using html entities

@var array
Encodes an array of data to be UTF8 over using html entities