- print_r: documentation ( source)
- serialize: documentation ( source)
<?php
class TestOb {
public function has() {
$str = serialize($this);
if ($str == serialize(new TestOb)) {
echo "SAME";
}
print_R($str);
}
}
$d = new TestOb();
$d->has();