On Sun, 19 Dec 2004, Andi Gutmans wrote:
At 03:42 AM 12/18/2004 +0100, Derick Rethans wrote:
>On Fri, 17 Dec 2004, Andi Gutmans wrote:
>
> > OK I think restoring BC for now is OK. I'm not sure var_dump() really > > has
>
>var_export() you mean?
>
> > to support protected/private but the manual says so: "The first one > > is that
> > the returned representation is valid PHP code, the second that it > > will also
> > return protected and private properties of an object with PHP 5.".
> > So we might want to fix one or the other at some point :)
>
>I've no idea why that last line was added, it's simply incorrect. This
>was never my plan to add. Also, those are *object* properties, which
>have nothing to do with the code that I just changed ;-)
I didn't realize that. I thought that code also ran for object properties.
Yeah, I meant var_export() and it seems like the PHP manual might need fixing.
Yup, and that's why I'm CC-ing them now. :)
Derick
Maybe var_dump() doc page needs also a little fix?, because both functions output public/private/protected properties.
<?
class xpto {
public $p = 'a';
private $pr ='b';
protected $prot=8;
static $a='a';
const CONSTT='hhh';function func() {}
}
$a = new xpto();
var_export($a); var_dump($a);
?>
outputs:
class xpto {
public $p = 'a';
private $pr = 'b';
protected $prot = 8;
}object(xpto)#1 (3) {
["p"]=>
string(1) "a"
["pr:private"]=>
string(1) "b"
["prot:protected"]=>
int(8)Nuno
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
