- var_export: documentation ( source)
<?php
interface Test
{
public function selfRef(Test $other);
}
class TestImpl implements Test
{
public function selfRef(Test $other)
{
echo var_export($other, true) . PHP_EOL;
}
public function nonContractSelfRef(self $other)
{
echo var_export($other, true) . PHP_EOL;
}
}
$a = new TestImpl();
$b = new TestImpl();
$a->selfRef($b);