I see that some themes are using esc_attr or esc_html and url after they define varible with get_post_meta, while others are using it during variable definition. What would be best practice
$portf_icon = get_post_meta($post->ID,'dt_portf_icon',true); echo esc_html($portf_icon);
$portf_icon = esc_html(get_post_meta($post->ID,'dt_portf_icon',true)); echo $portf_icon;
Does it have any difference and which one would be best practices?