Hiya, it was in the vendor/composer/platform_check.php
file. Although running the above command seems to have removed that file from Composer's vendor system files.
I use Local WP as a development environment (mainly because it's just super quick) and the maximum php version it supports right now is 8.0.0. I could probably update it somehow, but it's just one of those things where it's probably a lot of effort and I could try getting an environment working another way potentially.
I hope that's helpful!
Edit:
I've just checked my php version on my system and funnily enough it says I'm running php 8.1.0. I think it may simply be a case of having to ditch Local WP for this one as I suppose it's doing some weird things in the background and maybe changing the php version.
But yeah, that's weird. It should be working.
I also reinstall the composer packages (to try and undo the ignore platform requirements flag I did prior) and the platform check file is back now.