- var_dump: documentation ( source)
<?php
class Foo
{
public function __get($key) { echo 'wut'; }
}
class Bar
{
public function __construct() { $this->wut = 'bar'; }
public function __get($key) { echo $key; }
}
class Baz
{
public function __construct() { $this->wut = 'baz'; }
}
$foo = new Foo;
$bar = new Bar;
$baz = new Baz;
var_dump([$foo->wut, $bar->wut, $baz->wut]);