1--TEST-- 2Serialize() must return a string or NULL 3--FILE-- 4<?php 5Class C implements Serializable { 6 public function serialize() { 7 return $this; 8 } 9 10 public function unserialize($blah) { 11 } 12} 13 14try { 15 var_dump(serialize(new C)); 16} catch (Exception $e) { 17 echo $e->getMessage(). "\n"; 18} 19 20echo "Done"; 21?> 22--EXPECTF-- 23Deprecated: %s implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d 24C::serialize() must return a string or NULL 25Done 26