Three ways to Serialize (X-Ref)

http://www.binarytides.com/blog/3-ways-to-serialize-variables-in-php/

Summary

  1. serialize and unserialize—Too messy and requires base 64 encoding and compression to work properly
  2. json_encode and json_decode—Better.
  3. var_export and eval—Better.
Advertisements

About samehramzylabib

See About on https://samehramzylabib.wordpress.com
This entry was posted in PHP Code Snippets, PHP Language Constructs, PHP Object Oriented Programming, PHP Script Writing, PHP Sessions Cookies and Header, PHP String. Bookmark the permalink.

Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s