DEV Community

loading...

My Formula in naming functions (Applicable in any programming languages)

ricardosawir profile image Ricardo Sawir ・1 min read

// filename.php
function filename_whatItIsAbout_whatItDoes(some, arguments) { 
// the code
}

//example
//session.php
function session_token_get() {
return $_SESSION['token'];
}
Enter fullscreen mode Exit fullscreen mode

Do you have your own formula? You can share yours. I use this especially when dealing with top/global functions.

Discussion (0)

pic
Editor guide