Don’t Copy Extra Variables

Some people use predefined variables to smaller-named variables to make their code appealing. This is redundant and could increase the memory of your script. Examples of variable usage:
Good Approach:

<?php 
echo strip_tags($_POST['myVariable']);
?>

Bad Approach:

<?php 
$myVariable = strip_tags($_POST['myVariable']);
echo $myVariable;
?>

Leave a Reply

Your email address will not be published. Required fields are marked *