function PhpSerialize::encode

Same name in other branches
  1. 9 core/lib/Drupal/Component/Serialization/PhpSerialize.php \Drupal\Component\Serialization\PhpSerialize::encode()
  2. 10 core/lib/Drupal/Component/Serialization/PhpSerialize.php \Drupal\Component\Serialization\PhpSerialize::encode()
  3. 11.x core/lib/Drupal/Component/Serialization/PhpSerialize.php \Drupal\Component\Serialization\PhpSerialize::encode()

Overrides SerializationInterface::encode

File

core/lib/Drupal/Component/Serialization/PhpSerialize.php, line 13

Class

PhpSerialize
Default serialization for serialized PHP.

Namespace

Drupal\Component\Serialization

Code

public static function encode($data) {
    return serialize($data);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.