summaryrefslogtreecommitdiff
path: root/Zend/tests/bug40757.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/bug40757.phpt')
-rwxr-xr-xZend/tests/bug40757.phpt28
1 files changed, 28 insertions, 0 deletions
diff --git a/Zend/tests/bug40757.phpt b/Zend/tests/bug40757.phpt
new file mode 100755
index 000000000..d413b1022
--- /dev/null
+++ b/Zend/tests/bug40757.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Bug #40757 (get_object_vars() get nothing in child class)
+--FILE--
+<?php
+class Base {
+ private $p1='sadf';
+
+ function getFields($obj){
+ return get_object_vars($obj);
+ }
+}
+
+class Child extends Base { }
+
+$base=new Base();
+print_r($base->getFields(new Base()));
+$child=new Child();
+print_r($child->getFields(new Base()));
+?>
+--EXPECT--
+Array
+(
+ [p1] => sadf
+)
+Array
+(
+ [p1] => sadf
+)