My formula in naming a function:
function filename_whatItIsabout_whatItDoes(some arguments) {
// the code
}
Useful especially when working with global/top functions.
example: function session_handleToken_get() {
return $_SESSION['token'];
}
applicable in any programming lang04:28 AM - 30 Nov 2020
// filename.php
function filename_whatItIsAbout_whatItDoes(some, arguments) {
// the code
}
//example
//session.php
function session_token_get() {
return $_SESSION['token'];
}
Do you have your own formula? You can share yours. I use this especially when dealing with top/global functions.
Top comments (0)