php/php-src#5743
I'm not sure where I would apply this change in phpstan, so creating this issue instead. As I was testing the new phpstan release, spotted this.
PHP8 allows casting these to ints to preserve backwards compatibility.
https://phpstan.org/r/16e2b057-6de9-4d84-b321-59042800a3e6