Home
last modified time | relevance | path

Searched refs:unserialize (Results 1 – 25 of 384) sorted by relevance

12345678910>>...16

/php-src/ext/standard/tests/serialize/
H A Dbug25378.phpt2 Bug #25378 (unserialize() crashes with invalid data)
5 var_dump(unserialize("s:-1:\"\";"));
6 var_dump(unserialize("i:823"));
7 var_dump(unserialize("O:8:\"stdClass :0:{}"));
8 var_dump(unserialize("O:8:\"stdClass\"+0:{}"));
9 var_dump(unserialize("O:1000:\"stdClass\":0:{}"));
10 var_dump(unserialize("a:2:{i:0;s:2:\"12\":"));
14 var_dump(unserialize("s:3000:\"123\";"));
15 var_dump(unserialize("s:3000:\"123"));
16 var_dump(unserialize("s:3:\"123;"));
[all …]
H A Dinvalid_signs_in_lengths.phpt6 var_dump(unserialize('s:+1:"x";'));
7 var_dump(unserialize('s:-1:"x";'));
8 var_dump(unserialize('a:+0:{}'));
9 var_dump(unserialize('a:-0:{}'));
10 var_dump(unserialize('O:+8:"stdClass":0:{}'));
11 var_dump(unserialize('O:-8:"stdClass":0:{}'));
12 var_dump(unserialize('C:+11:"ArrayObject":0:{}'));
14 var_dump(unserialize('a:1:{i:0;r:+1;}'));
15 var_dump(unserialize('a:1:{i:0;r:-1;}'));
16 var_dump(unserialize('a:1:{i:0;R:+1;}'));
[all …]
H A Dmax_depth.phpt28 var_dump(unserialize(
32 var_dump(unserialize(
38 var_dump(unserialize(
42 var_dump(unserialize(
55 var_dump(unserialize(
59 var_dump(unserialize(
72 public function unserialize($str) {
80 var_dump(is_array(unserialize(
92 var_dump(unserialize(
96 var_dump(unserialize(
[all …]
H A D002.phpt2 Bug #25378 (unserialize() crashes with invalid data)
5 var_dump(unserialize('b:0;'));
6 var_dump(unserialize('b:1;'));
7 var_dump(unserialize('i:823;'));
8 var_dump(unserialize('s:0:"";'));
9 var_dump(unserialize('s:3:"foo";'));
10 var_dump(unserialize('a:1:{i:0;s:2:"12";}'));
11 var_dump(unserialize('a:2:{i:0;a:0:{}i:1;a:0:{}}'));
12 var_dump(unserialize('a:3:{i:0;s:3:"foo";i:1;s:3:"bar";i:2;s:3:"baz";}'));
13 var_dump(unserialize('O:8:"stdClass":0:{}'));
H A Dunserialize_allowed_classes_option_invalid_array.phpt2 Test unserialize() with array allowed_classes and nonsensical values
12 unserialize($s, ["allowed_classes" => [null]]);
17 unserialize($s, ["allowed_classes" => [false]]);
22 unserialize($s, ["allowed_classes" => [true]]);
27 unserialize($s, ["allowed_classes" => [42]]);
32 unserialize($s, ["allowed_classes" => [15.2]]);
37 unserialize($s, ["allowed_classes" => [[]]]);
42 unserialize($s, ["allowed_classes" => [STDERR]]);
47 unserialize($s, ["allowed_classes" => [new stdClass]]);
54 TypeError: unserialize(): Option "allowed_classes" must be an array of class names, null given
[all …]
H A Dserialization_error_002.phpt2 Test unserialize(): error is indistinguishable from deserialized boolean
5 echo "*** Testing unserialize() error/boolean distinction ***\n";
12 $deserialized_garbage = unserialize($garbage);
15 $deserialized_false = unserialize($serialized_false);
18 echo "unserialize error and deserialized false are identical? " . (bool) ($deserialized_false == $d…
22 return ($str == serialize(false) || @unserialize($str) !== false);
25 // Test unserialize error idiom
32 *** Testing unserialize() error/boolean distinction ***
35 Warning: unserialize(): Error at offset 0 of 27 bytes in %s on line %d
38 unserialize error and deserialized false are identical? 1
H A Dserialization_objects_018.phpt7 public function unserialize($data) {}
12 var_dump(unserialize('C:1:"A":3x{foo}'));
14 var_dump(unserialize('C:1:"A":3:xfoo}'));
16 var_dump(unserialize('C:1:"A":3:{foox'));
18 var_dump(unserialize('C:1:"A":'));
23 Warning: unserialize(): Error at offset 9 of 15 bytes in %s on line %d
26 Warning: unserialize(): Error at offset 10 of 15 bytes in %s on line %d
29 Warning: unserialize(): Error at offset 14 of 15 bytes in %s on line %d
32 Warning: unserialize(): Error at offset 8 of 8 bytes in %s on line %d
H A Dunserialize_extra_data_001.phpt2 Test unserialize() with extra data at the end of a valid value
6 var_dump(unserialize('i:5;i:6;'));
7 var_dump(unserialize('N;i:6;'));
8 var_dump(unserialize('b:1;i:6;'));
9 var_dump(unserialize('a:1:{s:3:"foo";b:1;}i:6;'));
13 Warning: unserialize(): Extra data starting at offset 4 of 8 bytes in %s on line %d
16 Warning: unserialize(): Extra data starting at offset 2 of 6 bytes in %s on line %d
19 Warning: unserialize(): Extra data starting at offset 4 of 8 bytes in %s on line %d
22 Warning: unserialize(): Extra data starting at offset 20 of 24 bytes in %s on line %d
H A Dunserialize_allowed_classes_option_invalid_class_names.phpt2 Test unserialize() with array allowed_classes and nonsensical class names
12 unserialize($s, ["allowed_classes" => [""]]);
17 unserialize($s, ["allowed_classes" => ["245blerg"]]);
22 unserialize($s, ["allowed_classes" => [" whitespace "]]);
27 unserialize($s, ["allowed_classes" => ["name\nwith whitespace"]]);
32 unserialize($s, ["allowed_classes" => ['$dollars']]);
37 unserialize($s, ["allowed_classes" => ["have\0nul_byte"]]);
44 ValueError: unserialize(): Option "allowed_classes" must be an array of class names, " whitespace …
45 ValueError: unserialize(): Option "allowed_classes" must be an array of class names, "name
47 ValueError: unserialize(): Option "allowed_classes" must be an array of class names, "$dollars" giv…
[all …]
H A Dunserialize_large.phpt6 var_dump(unserialize("a:1000000000:{}"));
7 var_dump(unserialize("O:1000000000:\"\":0:{}"));
8 var_dump(unserialize("O:1:\"X\":1000000000:{}"));
9 var_dump(unserialize("C:1:\"X\":1000000000:{}"));
13 Warning: unserialize(): Error at offset 14 of 15 bytes in %s on line %d
16 Warning: unserialize(): Error at offset 2 of 20 bytes in %s on line %d
19 Warning: unserialize(): Error at offset 18 of 21 bytes in %s on line %d
24 Warning: unserialize(): Error at offset 20 of 21 bytes in %s on line %d
H A Dunserialize_allowed_classes_option_invalid_value.phpt2 Test unserialize() with non-bool/array allowed_classes
12 unserialize($s, ["allowed_classes" => null]);
18 unserialize($s, ["allowed_classes" => 0]);
25 unserialize($s, ["allowed_classes" => 1]);
32 unserialize(): Option "allowed_classes" must be of type array|bool, null given
33 unserialize(): Option "allowed_classes" must be of type array|bool, int given
34 unserialize(): Option "allowed_classes" must be of type array|bool, int given
H A Dunserialize_classes.phpt2 Test unserialize() with second parameter
11 var_dump(unserialize($s));
12 var_dump(unserialize($s, ["allowed_classes" => false]));
13 var_dump(unserialize($s, ["allowed_classes" => true]));
14 var_dump(unserialize($s, ["allowed_classes" => ["bar"]]));
15 var_dump(unserialize($s, ["allowed_classes" => ["FOO"]]));
16 var_dump(unserialize($s, ["allowed_classes" => ["bar", "foO"]]));
H A Dunserialize_uppercase_s.phpt2 Test unserialize() with the 'S' format emits a deprecation.
6 var_dump(unserialize('S:1:"e";'));
7 var_dump(unserialize('S:1:"\65";'));
11 Deprecated: unserialize(): Unserializing the 'S' format is deprecated in %s on line %d
14 Deprecated: unserialize(): Unserializing the 'S' format is deprecated in %s on line %d
H A Dunserialize_extra_data_002.phpt2 Test unserialize() with extra data at the end of a valid value with nested unserialize
11 $this->foo = unserialize($foo['bar']);
25 var_dump(unserialize(serialize($f) . 'garbage'));
29 Warning: unserialize(): Extra data starting at offset 81 of 88 bytes in %s on line %d
31 Warning: unserialize(): Extra data starting at offset 42 of 49 bytes in %s on line %d
H A Dbug72663_2.phpt2 Bug #72663 (2): Don't allow references into failed unserialize
11 function unserialize($data) {
12 $this->data = unserialize($data);
18 var_dump(unserialize($exploit));
24 Warning: unserialize(): Unexpected end of serialized data in %s on line %d
26 Warning: unserialize(): Error at offset 49 of 50 bytes in %s on line %d
28 Warning: unserialize(): Error at offset 82 of 83 bytes in %s on line %d
H A Dunserialize_subclasses.phpt2 Test unserialize() with allowed_classes and subclasses
12 var_dump(unserialize($c, ["allowed_classes" => ["C"]]));
13 var_dump(unserialize($c, ["allowed_classes" => ["D"]]));
14 var_dump(unserialize($d, ["allowed_classes" => ["C"]]));
15 var_dump(unserialize($d, ["allowed_classes" => ["D"]]));
H A Dbug74300.phpt2 Bug #74300 (unserialize() for float nvexp part)
7 var_dump(unserialize('d:2e+2;'));
8 var_dump(unserialize('d:2e++2;'));
13 Warning: unserialize(): Error at offset 0 of 8 bytes in %s on line %d
H A Dbug73825.phpt2 Bug #73825 Heap out of bounds read on unserialize in finish_nested_data()
5 $obj = unserialize('O:8:"00000000":');
9 Warning: Bad unserialize data in %sbug73825.php on line %d
11 Warning: unserialize(): Error at offset 13 of 15 bytes in %s on line %d
/php-src/ext/gmp/tests/
H A Dserialize.phpt10 var_dump(unserialize($s));
15 var_dump(unserialize($s));
20 unserialize('C:3:"GMP":0:{}');
24 unserialize('C:3:"GMP":9:{s:2:"42";}');
28 unserialize('O:3:"GMP":0:{}');
32 unserialize('O:3:"GMP":1:{i:0;i:0;}');
36 unserialize('O:3:"GMP":1:{i:0;s:0:"";}');
69 string(28) "Could not unserialize number"
71 string(28) "Could not unserialize number"
72 string(28) "Could not unserialize number"
[all …]
/php-src/ext/spl/tests/
H A Dunserialize_errors.phpt10 unserialize('O:11:"ArrayObject":0:{}');
16 unserialize('O:11:"ArrayObject":3:{i:0;b:1;i:1;a:0:{}i:2;a:0:{}}');
22 unserialize('O:11:"ArrayObject":3:{i:0;i:0;i:1;a:0:{}i:2;i:0;}');
28 unserialize('O:11:"ArrayObject":3:{i:0;i:0;i:1;i:0;i:2;a:0:{}}');
57 unserialize('O:13:"ArrayIterator":0:{}');
69 unserialize('O:13:"ArrayIterator":3:{i:0;i:0;i:1;a:0:{}i:2;i:0;}');
75 unserialize('O:13:"ArrayIterator":3:{i:0;i:0;i:1;i:0;i:2;a:0:{}}');
83 unserialize('O:19:"SplDoublyLinkedList":0:{}');
109 unserialize('O:16:"SplObjectStorage":0:{}');
115 unserialize('O:16:"SplObjectStorage":2:{i:0;i:0;i:1;a:0:{}}');
[all …]
/php-src/Zend/tests/property_hooks/
H A Dunserialize.phpt2 unserialize() with hooks
23 var_dump($test_u = unserialize($s));
28 var_dump(unserialize($s));
40 var_dump($test2_u = unserialize($s));
45 var_dump(unserialize($s));
57 Warning: unserialize(): Cannot unserialize value for virtual property Test::$prop3 in %s on line %d
59 Warning: unserialize(): Error at offset 26 of 32 bytes in %s on line %d
/php-src/ext/standard/tests/math/
H A Dbug27646.phpt2 Bug #27646 (Cannot serialize/unserialize non-finite numeric values)
10 var_dump(unserialize(serialize($f)));
15 var_dump(unserialize(serialize($f)));
20 var_dump(unserialize(serialize($f)));
25 var_dump(unserialize(serialize($f)));
30 var_dump(unserialize(serialize($f)));
/php-src/Zend/tests/enum/
H A Dunserialize-non-enum.phpt2 Enum unserialize non-enum
8 var_dump(unserialize('E:7:"Foo:Bar";'));
12 Warning: unserialize(): Class 'Foo' is not an enum in %s on line %d
14 Warning: unserialize(): Error at offset 0 of 14 bytes in %s on line %d
H A Dunserialize-non-existent-case.phpt2 Enum unserialize non-existent case
10 var_dump(unserialize('E:7:"Foo:Baz";'));
14 Warning: unserialize(): Undefined constant Foo::Baz in %s on line %d
16 Warning: unserialize(): Error at offset 14 of 14 bytes in %s on line %d
H A Dunserialize-missing-colon.phpt2 Enum unserialize with missing colon
10 var_dump(unserialize('E:6:"FooBar";'));
14 Warning: unserialize(): Invalid enum name 'FooBar' (missing colon) in %s on line %d
16 Warning: unserialize(): Error at offset 0 of 13 bytes in %s on line %d

Completed in 23 milliseconds

12345678910>>...16