@@ -865,12 +865,7 @@ object(TestEntity)#3 (4) {
865865
866866 <section xml : id =" pdo.constants.fetch-serialize" annotations =" chunk:false" >
867867 <title >PDO::FETCH_SERIALIZE (<type >int</type >)</title >
868- <warning >
869- <simpara >
870- This feature has been <emphasis >DEPRECATED</emphasis > as of PHP 8.1.0.
871- Relying on this feature is highly discouraged.
872- </simpara >
873- </warning >
868+ &warn.deprecated.feature-8-1-0;
874869 <simpara >
875870 This fetch mode can only be used combined with
876871 <constant >PDO::FETCH_CLASS</constant > (and
@@ -912,14 +907,16 @@ class TestEntity implements Serializable
912907 . (isset($this->name) ? 'Yes' : 'No') . "\n";
913908 }
914909
915- public function serialize() {
910+ public function serialize()
911+ {
916912 return join(
917913 "|",
918914 [$this->userid, $this->name, $this->country, $this->referred_by_userid]
919915 );
920916 }
921917
922- public function unserialize(string $data) {
918+ public function unserialize(string $data)
919+ {
923920 $parts = explode("|", $data);
924921 $this->userid = (int) $parts[0];
925922 $this->name = $parts[1];
@@ -946,7 +943,7 @@ $origObj->referred_by_userid = null;
946943$insert = $db->prepare("INSERT INTO serialize (sdata) VALUES (:sdata)");
947944$insert->execute(['sdata' => $origObj->serialize()]);
948945
949- print "\nRetrieve result:\n"
946+ print "\nRetrieve result:\n";
950947$query = "SELECT sdata FROM serialize";
951948$stmt = $db->query($query);
952949// NOTE: Constructor is never called!
0 commit comments