1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 08:58:28 +02:00
Files
archived-php-src/ext/standard/tests/serialize/sleep_mangled_name_clash.phpt
T
2020-09-15 14:26:16 +02:00

17 lines
413 B
PHP

--TEST--
__sleep() returns properties clashing only after mangling
--FILE--
<?php
class Test {
private $priv;
public function __sleep() {
return ["\0Test\0priv", "priv"];
}
}
$s = serialize(new Test);
var_dump(str_replace("\0", '\0', $s));
?>
--EXPECTF--
Notice: serialize(): "priv" is returned from __sleep() multiple times in %s on line %d
string(37) "O:4:"Test":1:{s:10:"\0Test\0priv";N;}"