Since your code looks like PHP code, I will assume that this is PHP.
Better if you use an array, both performance and readability.
$results = get_all_result(); //the above should return an array, so you can access //$results['result1'], $results['result2'], $results['result3'], $results['result4']
A smaller call is better for performance. Store the result in an array or object for better readability.
In addition, premature optimization is evil. You must create code that is supported, because creation is about 10% of what you do. 90% of the life cycle of a code is its support, fixing bugs, changing a function, adding a new function, etc. Supported code will also have fewer errors, as it is written, the error will be easier to recognize.
source share