<?php
class MyClass {
public function __construct($x) {
$this->callback = $x;
}
/** @var callable|false */
public $callback;
function example() : void {
if (is_array($this->callback)) {
// Unexpected ERROR: InvalidArgument - Argument 1 of count expects array<array-key, mixed>|Countable|SimpleXMLElement|ResourceBundle, callable-array{0: string|object, 1: string} provided
echo "Count is: " . count($this->callback);
}
}
}