It is a good idea to store values from the global $post if they are used multiple times?
Your first example with a separate variable is actually slower. In both cases you have the $post variable already in your scope, and reading from that doesn’t cost anything. But if you create a copy and assign that to a new variable, you are using more resources. Just reading an existing variable doesn’t cost any … Read more