- var_dump: documentation ( source)
- class_exists: documentation ( source)
<?php
namespace Random {
if (!\class_exists(\Random\Randomizer::class)) {
final class Randomizer
{
public function nextInt(): int
{
return 1;
}
}
}
}
namespace {
$randomizer = new \Random\Randomizer;
\var_dump($randomizer->nextInt());
}