Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Routine improve performance
// When place the code in a routine, you can easily optimize the code
// Example:
// You can optimize the code inside the routine below
function isTooLong($string) {
if(strlen($string) > 20) {
return true;
} else {
return false;
// With
function isTooLong($string) {
return strlen($string) > 20 ? return true : return false;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.