- Output for 7.2.0 - 7.2.34, 7.3.0 - 7.3.26, 7.4.0 - 7.4.13, 8.0.0
- boolean
<?php
declare(strict_types=1);
interface A {
public function foo(int $id): void;
}
interface B {
public function foo(string $id): void;
}
class Bar implements A, B {
public function foo($id): void
{
echo gettype($id);
}
}
(new Bar)->foo(true);