summaryrefslogtreecommitdiff
path: root/Zend/tests/bug40757.phpt
blob: b5c91c79ce6d68d533febec742f475a3625f6f70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
)