/ Published in: PHP
URL: http://www.evinw.com
Correct way to serialize array or object using base64 encode and UTF8 enforcing.
Expand |
Embed | Plain Text
<?php /* |--------------------------- | Author: Evin Weissenberg |--------------------------- */ private $subject; //object or array private $utf8; const CHARSET = 'default_charset'; const ENCODING = 'UTF-8'; private function __constructor() { } public function setSubject($subject) { $this->subject = $subject; return $this; } return $serialize; } return $un_serialize; } private function __destructor() { } } //Usage $serialize = $obj->setSubject($array)->serialize();
You need to login to post a comment.
