WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Платформа для конвертации и монетизации трафика
функция не описана

Services_JSON::__construct() public WP 1.0

Запрещена (устарела) с версии 5.3.0. Больше не поддерживается и может быть удалена. Используйте PHP native JSON extension.

constructs a new JSON instance

{} Это метод класса: Services_JSON{}

Хуков нет.


Null. Ничего.


$Services_JSON = new Services_JSON();
$Services_JSON->__construct( $use );

object behavior flags; combine with boolean-OR

possible values:

  • SERVICES_JSON_LOOSE_TYPE: loose typing. "{...}" syntax creates associative arrays instead of objects in decode().
  • SERVICES_JSON_SUPPRESS_ERRORS: error suppression. Values which can't be encoded (e.g. resources) appear as NULL instead of throwing errors. By default, a deeply-nested resource will bubble up with an error, so all return values from encode() should be checked with isError()
  • SERVICES_JSON_USE_TO_JSON: call toJSON when serializing objects It serializes the return value from the toJSON call rather than the object itself, toJSON can return associative arrays, strings or numbers, if you return an object, make sure it does not have a toJSON method, otherwise an error will occur.

По умолчанию: 0

Список изменений

Устарела с 5.3.0 Use the PHP native JSON extension instead.

Код Services_JSON::__construct() WP 5.5.3

function __construct( $use = 0 )
    _deprecated_function( __METHOD__, '5.3.0', 'The PHP native JSON extension' );

    $this->use = $use;
    $this->_mb_strlen            = function_exists('mb_strlen');
    $this->_mb_convert_encoding  = function_exists('mb_convert_encoding');
    $this->_mb_substr            = function_exists('mb_substr');