xref: /PHP-7.1/Zend/tests/bug26010.phpt (revision 113213f0)
1--TEST--
2Bug #26010 (private / protected variables get exposed by get_object_vars())
3--FILE--
4<?php
5class foo {
6	private $private = 'private';
7	protected $protected = 'protected';
8	public $public = 'public';
9}
10$data = new foo();
11$obj_vars = get_object_vars($data);
12var_dump($obj_vars);
13?>
14--EXPECT--
15array(1) {
16  ["public"]=>
17  string(6) "public"
18}
19