• For word delimiters, use uppercase letters for the rest of the words;

  • The first letter in the name is capitalized;

Example

class NameOneTwo

class Name

Argument names in methods

  • The first letter is always lowercase;
  • All other words in the name begin with a capital letter, as in the naming of classes.

Example

function HandleError ($ errorNumber) {

$error = new OsError; $time_of_error = $error->GetTimeOfError(); $error_processor = $error->GetErrorProcessor(); 

}

Who agree?

    1 answer 1

    What you describe is just one of the well-known conventions for naming classes / methods / functions / etc, no more and no less recommended for use, for example, in C # (and not very recommended, for example, in Java) . As for these your php, for half of the pogromists, the only "true" approach is something like eto_moya_super_funkzia ()

    By the way, here is this identifier: $ time_of_error you yourself contradict the approach you are describing. In this case, it is more logical to call it $ errorTime - underscores and prepositions like of only take up space and do not fit into the overall picture. In general, look at this topic here (mainly comments)