Finding POST variable without apostrophe in code

I have a PHP application and since upgrading to PHP 8. I have discovered that in some random locations I have forgot to put apostrophe in some variable names so for example it should be:

$POST['VariableName']

But I have accidently put it as

$POST[VariableName]

And for some reason in previous PHP versions it just worked without breaking. However, in PHP 8, it’s not liking it. And I’m just not sure how I can go through so many files to look for this. Is there a way where I can maybe write a PHP code to go through a file and look for this error? or possibly use NotePad++ ?

Help and suggestions would really be appreciated.

Thanks