Changeset 46377 for trunk/src/wp-includes/class-json.php
- Timestamp:
- 10/03/2019 02:47:17 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-json.php
r46205 r46377 125 125 * constructs a new JSON instance 126 126 * 127 * @deprecated 5.3.0 Use the PHP native JSON extension instead. 128 * 127 129 * @param int $use object behavior flags; combine with boolean-OR 128 130 * … … 155 157 /** 156 158 * PHP4 constructor. 159 * 160 * @deprecated 5.3.0 Use __construct() instead. 161 * 162 * @see __construct() 157 163 */ 158 164 public function Services_JSON( $use = 0 ) { … … 172 178 * that lack the multibye string extension. 173 179 * 180 * @deprecated 5.3.0 Use the PHP native JSON extension instead. 181 * 174 182 * @param string $utf16 UTF-16 character 175 183 * @return string UTF-8 character … … 217 225 * provides a slower PHP-only method for installations 218 226 * that lack the multibyte string extension. 227 * 228 * @deprecated 5.3.0 Use the PHP native JSON extension instead. 219 229 * 220 230 * @param string $utf8 UTF-8 character … … 260 270 * encodes an arbitrary variable into JSON format (and sends JSON Header) 261 271 * 272 * @deprecated 5.3.0 Use the PHP native JSON extension instead. 273 * 262 274 * @param mixed $var any number, boolean, string, array, or object to be encoded. 263 275 * see argument 1 to Services_JSON() above for array-parsing behavior. … … 277 289 /** 278 290 * encodes an arbitrary variable into JSON format without JSON Header - warning - may allow XSS!!!!) 291 * 292 * @deprecated 5.3.0 Use the PHP native JSON extension instead. 279 293 * 280 294 * @param mixed $var any number, boolean, string, array, or object to be encoded. … … 300 314 /** 301 315 * PRIVATE CODE that does the work of encodes an arbitrary variable into JSON format 316 * 317 * @deprecated 5.3.0 Use the PHP native JSON extension instead. 302 318 * 303 319 * @param mixed $var any number, boolean, string, array, or object to be encoded. … … 546 562 * array-walking function for use in generating JSON-formatted name-value pairs 547 563 * 564 * @deprecated 5.3.0 Use the PHP native JSON extension instead. 565 * 548 566 * @param string $name name of key to use 549 567 * @param mixed $value reference to an array element to be encoded … … 568 586 * reduce a string by removing leading and trailing comments and whitespace 569 587 * 588 * @deprecated 5.3.0 Use the PHP native JSON extension instead. 589 * 570 590 * @param $str string string value to strip of comments and whitespace 571 591 * … … 596 616 /** 597 617 * decodes a JSON string into appropriate variable 618 * 619 * @deprecated 5.3.0 Use the PHP native JSON extension instead. 598 620 * 599 621 * @param string $str JSON-formatted string … … 887 909 888 910 /** 911 * @deprecated 5.3.0 Use the PHP native JSON extension instead. 912 * 889 913 * @todo Ultimately, this should just call PEAR::isError() 890 914 */ … … 904 928 905 929 /** 906 * Calculates length of string in bytes 907 * @param string 908 * @return integer length 909 */ 930 * Calculates length of string in bytes 931 * 932 * @deprecated 5.3.0 Use the PHP native JSON extension instead. 933 * 934 * @param string 935 * @return integer length 936 */ 910 937 function strlen8( $str ) 911 938 { … … 919 946 920 947 /** 921 * Returns part of a string, interpreting $start and $length as number of bytes. 922 * @param string 923 * @param integer start 924 * @param integer length 925 * @return integer length 926 */ 948 * Returns part of a string, interpreting $start and $length as number of bytes. 949 * 950 * @deprecated 5.3.0 Use the PHP native JSON extension instead. 951 * 952 * @param string 953 * @param integer start 954 * @param integer length 955 * @return integer length 956 */ 927 957 function substr8( $string, $start, $length=false ) 928 958 { … … 944 974 class Services_JSON_Error extends PEAR_Error 945 975 { 976 /** 977 * PHP5 constructor. 978 * 979 * @deprecated 5.3.0 Use the PHP native JSON extension instead. 980 */ 946 981 function __construct($message = 'unknown error', $code = null, 947 982 $mode = null, $options = null, $userinfo = null) … … 952 987 } 953 988 989 /** 990 * PHP4 constructor. 991 * 992 * @deprecated 5.3.0 Use __construct() instead. 993 * 994 * @see __construct() 995 */ 954 996 public function Services_JSON_Error($message = 'unknown error', $code = null, 955 997 $mode = null, $options = null, $userinfo = null) { … … 968 1010 /** 969 1011 * PHP5 constructor. 1012 * 1013 * @deprecated 5.3.0 Use the PHP native JSON extension instead. 970 1014 */ 971 1015 function __construct( $message = 'unknown error', $code = null, … … 977 1021 /** 978 1022 * PHP4 constructor. 1023 * 1024 * @deprecated 5.3.0 Use __construct() instead. 1025 * 1026 * @see __construct() 979 1027 */ 980 1028 public function Services_JSON_Error( $message = 'unknown error', $code = null,
Note: See TracChangeset
for help on using the changeset viewer.