As PHP is not a typed language, you may do this.
Typed (Java):
float i = 3.563
string s = "3.563"
Non-Typed (PHP):
e.g on Line 10: i = 3.563;
Then, further down: i = "3.563";
In a non-typed programming language, it is up to you, to not having a chaos with your var-names. My advice is:
Basically, it is allowed, but...
If suddenly, you'll put a boolean or a float in previously stringed variable, I'd say, that's not clean programming.
You may encounter problems in bigger applications. Here's why:
For you as a programmer, it's cleaner to create another variable for other values, than e.g.
$image = get_field('image_3');
and further down you say: $image = true;
Will you remember on line 10'000 (or as commented: on line 42) what kind of value you had in the $image
var?
But if you have an $image
var and a $someThingIstrue
var, you'll see by the name of the variable, what it's for.