I’m having this problem when I am trying to serialize my class I get the exception
Serialization of 'SimpleXMLElement' is not allowed.
I don’t get the error. I am not even using the xml features of PHP.. What does this error mean ?
The code:
$test = new \My\Name\Space\MyClass();
die(serialize($test));
You have a
SimpleXmlElementin the object graph of the\My\Name\Space\MyClassinstance but it cannot be serialized. Add the magic__sleepmethod to influence which properties get serialized and which are ignored or implement the Serializable interface