We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5819ff4 + 671fc2e commit 7d7b7e8Copy full SHA for 7d7b7e8
ext/standard/tests/serialize/bug76300.phpt
@@ -0,0 +1,29 @@
1
+--TEST--
2
+Bug #76300: Unserialize of extended protected member broken
3
+--FILE--
4
+<?php
5
+class Base {
6
+ private $id;
7
+ public function __construct($id)
8
+ {
9
+ $this->id = $id;
10
+ }
11
+}
12
+class Derived extends Base {
13
+ protected $id;
14
15
16
+ parent::__construct($id + 20);
17
18
19
20
+$a = new Derived(44);
21
+$s = serialize($a);
22
+$u = unserialize($s);
23
+print_r($u);
24
+--EXPECT--
25
+Derived Object
26
+(
27
+ [id:protected] => 44
28
+ [id:Base:private] => 64
29
+)
0 commit comments