ecometer

Use single quotes (') instead of double (“)

(Development)
#62

You can use either single (‘) or double (“) quotes to declare a character string in PHP. Double quotes allow the developer to insert variables which will be substituted when run.
But if the character string has no variables, use single quotes instead. This stops the PHP from looking for variables to substitute, reducing CPU usage.

Optimize the following code:

echo "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt."

by replacing it with:

echo 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt.'
This best practice should only be applied if it is coherent with your project's specifications.
Under CC-By-NX-SA license