- var_dump: documentation ( source)
<?php
class MyObjectStorage extends SplObjectStorage {
public function contains(object $o): bool {
if ($o instanceof stdClass) {
return true;
} else {
return false;
}
}
}
$std = new stdClass();
$storage = new MyObjectStorage();
var_dump($storage->contains($std));
var_dump(isset($storage[$std]));