- var_dump: documentation ( source)
- uniqid: documentation ( source)
<?php
class foo {
public $value;
public function __invoke($arg) {
$this->value = $arg;
}
public function test() {
return $this->value;
}
}
$arg = uniqid();
$a = new foo;
$a->__invoke($arg);
var_dump($arg === $a->test());