Legend:

WordPress accepts scalar values for its option, transient, and meta APIs. It also accepts non-scalar values that are serializable. An array is, as are most objects. However, I see no reason to have custom code to handle SinpleXML objects, or any other non-serializable elements. They cannot be serialized for whichever reason the writer decided.

1

WordPress accepts scalar values for its option, transient, and meta APIs. It also accepts non-scalar values that are serializable. An array is, as are most objects. However, I see no reason to have custom code to handle SimpleXML objects, or any other non-serializable elements. They cannot be serialized for whichever reason the writer decided.

2

2

3

3

If you need to store such objects, I suggest you employ a custom workaround.