if I do serialize($obj)
, I get:
Serialization of 'Closure' is not allowed
Is there any way these closures can be ignored when serializing? I don't need them when I unserialize the string anyway (value of those properties can be null or whatever).
My class looks smth like this:
Class Node{
protected $attrs = array();
}
$attrs
is an associative array that can contain some elements that are closures, like
$attrs['validator'] = function(){...}