- var_dump: documentation ( source)
<?php
class Foo {
protected $foo = [];
function add($name, $value, $priority = 500) {
$this->foo[$name][$priority][] = $value;
}
public function get() {
return $this->foo;
}
}
$foo = new Foo;
$foo->add('foo', 'a');
$foo->add('foo', 'a', 1000);
$foo->add('foo', 'b');
$foo->add('foo', 'c', 0);
var_dump($foo->get());