Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tests/021.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ class Obj implements Serializable {
$tmp = unpack('N*', $serialized);
$this->__construct($tmp[1], $tmp[2]);
}

public function __serialize() {
return $this->serialize();
}

public function __unserialize($serialized) {
return $this->unserialize();
}
}

$o = new Obj(1, 2);
Expand Down
8 changes: 8 additions & 0 deletions tests/031.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ class Obj implements Serializable {
throw new Exception("exception in unserialize $c");
}
}

public function __serialize() {
return $this->serialize();
}

public function __unserialize($serialized) {
return $this->unserialize();
}
}

$a = new Obj(1, 0);
Expand Down
8 changes: 8 additions & 0 deletions tests/042.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ class Foo implements Serializable {
public function unserialize($str) {
echo "Should not be run.\n";
}

public function __serialize() {
return $this->serialize();
}

public function __unserialize($serialized) {
return $this->unserialize();
}
}

$array = array($closure, new Foo());
Expand Down