blob: 6288cfc52e53ed5953e264ae867bd6ce1ed6efee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
--TEST--
Lengths and references are not signed
--FILE--
<?php
var_dump(unserialize('s:+1:"x";'));
var_dump(unserialize('s:-1:"x";'));
var_dump(unserialize('a:+0:{}'));
var_dump(unserialize('a:-0:{}'));
var_dump(unserialize('O:+8:"stdClass":0:{}'));
var_dump(unserialize('O:-8:"stdClass":0:{}'));
var_dump(unserialize('C:+11:"ArrayObject":0:{}'));
var_dump(unserialize('C:-11:"ArrayObject":0:{}'));
var_dump(unserialize('a:1:{i:0;r:+1;}'));
var_dump(unserialize('a:1:{i:0;r:-1;}'));
var_dump(unserialize('a:1:{i:0;R:+1;}'));
var_dump(unserialize('a:1:{i:0;R:-1;}'));
?>
--EXPECTF--
Notice: unserialize(): Error at offset 0 of 9 bytes in %s on line %d
bool(false)
Notice: unserialize(): Error at offset 0 of 9 bytes in %s on line %d
bool(false)
Notice: unserialize(): Error at offset 0 of 7 bytes in %s on line %d
bool(false)
Notice: unserialize(): Error at offset 0 of 7 bytes in %s on line %d
bool(false)
Notice: unserialize(): Error at offset 0 of 20 bytes in %s on line %d
bool(false)
Notice: unserialize(): Error at offset 0 of 20 bytes in %s on line %d
bool(false)
Notice: unserialize(): Error at offset 0 of 24 bytes in %s on line %d
bool(false)
Notice: unserialize(): Error at offset 0 of 24 bytes in %s on line %d
bool(false)
Notice: unserialize(): Error at offset 9 of 15 bytes in %s on line %d
bool(false)
Notice: unserialize(): Error at offset 9 of 15 bytes in %s on line %d
bool(false)
Notice: unserialize(): Error at offset 9 of 15 bytes in %s on line %d
bool(false)
Notice: unserialize(): Error at offset 9 of 15 bytes in %s on line %d
bool(false)
|