コード例 #1
0
ファイル: Val.php プロジェクト: appcia/utils
 /**
  * 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;
 }
コード例 #2
0
ファイル: ArrayObject.php プロジェクト: duncan3dc/serial
 /**
  * Serialize this instance as PHP.
  *
  * @return string
  */
 public function asPhp()
 {
     return Php::encode($this);
 }