1
0
mirror of https://github.com/php/php-src.git synced 2026-03-27 17:52:16 +01:00
Files
archived-php-src/ext/standard/tests/serialize/serialization_objects_010.phpt
2020-06-24 13:13:44 +02:00

25 lines
387 B
PHP

--TEST--
Serialize() must return a string or NULL
--FILE--
<?php
Class C implements Serializable {
public function serialize() {
return $this;
}
public function unserialize($blah) {
}
}
try {
var_dump(serialize(new C));
} catch (Exception $e) {
echo $e->getMessage(). "\n";
}
echo "Done";
?>
--EXPECT--
C::serialize() must return a string or NULL
Done