- print_r: documentation ( source)
<?php
class Foo {
protected $_secret = null;
public function bar( $value ) {
$this->_secret = $value;
}
}
class Baz {
private $_foo = null;
public function __construct() {
$this->_foo = new Foo();
}
public function get() {
return $this->_foo;
}
}
$o = new Baz();
print_r( $o );
$o->get()->bar( 'name' );
print_r( $o );