/** * Get hash for value for any type * * @param mixed $value * * @return string */ public static function hash($value) { $hash = is_object($value) ? spl_object_hash($value) : md5(Php::encode($value)); return $hash; }
/** * Serialize this instance as PHP. * * @return string */ public function asPhp() { return Php::encode($this); }