- Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
- $mixed is 1
<?php
class HelloWorld
{
public function sayHello($mixed): void
{
if (ctype_digit((string) $mixed)) {
if ($mixed === 1) {
echo '$mixed is 1';
}
}
}
}
$h = new HelloWorld();
$h->sayHello(1);