]> granicus.if.org Git - php/commitdiff
Add test case for bug #26010
authorMoriyoshi Koizumi <moriyoshi@php.net>
Fri, 31 Oct 2003 17:12:16 +0000 (17:12 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Fri, 31 Oct 2003 17:12:16 +0000 (17:12 +0000)
Zend/tests/bug26010.phpt [new file with mode: 0644]

diff --git a/Zend/tests/bug26010.phpt b/Zend/tests/bug26010.phpt
new file mode 100644 (file)
index 0000000..33988de
--- /dev/null
@@ -0,0 +1,19 @@
+--TEST--
+Bug #26010 (private / protected variables get exposed by get_object_vars())
+--FILE--
+<?php
+class foo {
+       private $private = 'private';
+       protected $protected = 'protected';
+       public $public = 'public';
+}
+$data = new foo();
+$obj_vars = get_object_vars($data);
+var_dump($obj_vars);
+?>
+--TEST--
+array(1) {
+  ["public"]=>
+  string(6) "public"
+}
+