If you want to serialize all but one properties, you can use:
<?php
class A
{
protected $a = 1;
protected $b = 2;
protected $c = 3;
protected $d = 4; // unwanted
public function __sleep()
{
return array_diff(array_keys(get_object_vars($this)), array('d'));
}
}