We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
as shown in
libphpserialize/phpserialize/serialize.py
Lines 102 to 105 in 8c2d724
consider a php object:
class A { private $a = 1; } class B extends A { private $a = 2; } new B();
php stores both a attributes, while with dir(), python returns all attributes, both declared or inherited, without distinguishing them.
a
dir()
so
class TestQwer: private_y = 1234 class TestNamespace(TestQwer): private_y = 2345 s = serialize(TestNamespace())
yields O:13:"TestNamespace":1:{s:16:"TestNamespacey";i:2345;} while the php code above yields O:1:"B":2:{s:4:"Ba";i:2;s:4:"Aa";i:1;}
O:13:"TestNamespace":1:{s:16:"TestNamespacey";i:2345;}
O:1:"B":2:{s:4:"Ba";i:2;s:4:"Aa";i:1;}
object(__PHP_Incomplete_Class)#1 (3) { ["__PHP_Incomplete_Class_Name"]=> string(1) "B" ["a":"B":private]=> int(2) ["a":"A":private]=> int(1) }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
as shown in
libphpserialize/phpserialize/serialize.py
Lines 102 to 105 in 8c2d724
consider a php object:
php stores both
a
attributes, while withdir()
, python returns all attributes, both declared or inherited, without distinguishing them.so
yields
O:13:"TestNamespace":1:{s:16:"TestNamespacey";i:2345;}
while the php code above yieldsO:1:"B":2:{s:4:"Ba";i:2;s:4:"Aa";i:1;}
The text was updated successfully, but these errors were encountered: