For error logging I want to save an object as string in my database. I don’t want to use serialization because that triggers the __sleep()-method. So is there another way to save an object as string without using serialize()?
For error logging I want to save an object as string in my database.
Share
You could try this
To save
$stringin the databse you could compress the string:To uncompress and print
$stringuse: