I always try to code with the best practises as possible, and regarding PHP, I use mainly the PSR-12 standards.
Now regarding var declarations, is it "wrong"