Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 06fb878d0c
Fetching contributors…

Cannot retrieve contributors at this time

31 lines (30 sloc) 0.94 kb
--TEST--
Test for bug #328: Private properties are incorrectly enumerated in case of extended classes
--INI--
html_errors=1
xdebug.default_enable=1
--FILE--
<?php
class Daddy
{
private $bar = 42;
protected $pro = 242;
public $pub = 342;
}
class Inherit extends Daddy
{
private $bar = 43;
protected $pro = 243;
public $pub = 343;
}
$a = new Inherit;
var_dump( $a );
?>
--EXPECT--
<pre class='xdebug-var-dump' dir='ltr'>
<b>object</b>(<i>Inherit</i>)[<i>1</i>]
<i>private</i> 'bar' <font color='#888a85'>=&gt;</font> <small>int</small> <font color='#4e9a06'>43</font>
<i>protected</i> 'pro' <font color='#888a85'>=&gt;</font> <small>int</small> <font color='#4e9a06'>243</font>
<i>public</i> 'pub' <font color='#888a85'>=&gt;</font> <small>int</small> <font color='#4e9a06'>343</font>
<i>private</i> 'bar' <small>(Daddy)</small> <font color='#888a85'>=&gt;</font> <small>int</small> <font color='#4e9a06'>42</font>
</pre>
Jump to Line
Something went wrong with that request. Please try again.