, . , , , . , , - , .
PSR, . , . PSR . , , PSR . , , PHP, , , . , , .
PSR :
- , - , , .
- . , - .
- , , . , , , , .
- , , , . .
- . - , , , , . Starbucks, Nero Costa , , , , .
, () ().
, ; . , JSON, . , . . .
, , . . , , , , , , . , . , . . , -, , , .
, , , . get_by_username|get_by_email, getByUsername|getByEmail.
(get_by|getBy)($field, $value), , . ucfirst . , __call? , , , lcfirst, , , , , , , . ( ) :
- lcfirst, , , lcfirst
- , ucfirst , , concat
Versus:
Snake , , .
- PHP, , . , , , , , .
ifCamelCaseWereReallyThatGreatEveryoneWouldBeAnsweringProgrammingQuestionsOnStackOverFlowLikeThis. asYouCanSeeForAnythingButTheShortestPhrasesShortFormQuicklyBecomesTiring. youCanUsuallyGetAwayWithItInProgrammingAsItsInSmallDosesAndInASeaOfWhiteSpace. anotherAnnoyanceWithCamelCaseIsWhenYouHaveAbbreviationsOrSingleLetterWords. itNotAllGood.
. , , . , , ( PHP). - , , , . , -.
, database_statement_row_read_next() . as Database\Statement::readNextRow .
, . , ( ), -, , , , ..
, , , , . , , , , , , .
, , , , , .
:
- = alpha_beta
- = alphaBeta
- = AlphaBeta
.
, ( ) . , , , PHP, , .
, , .
, , , , , , . , . , , , , -, -, .
:
/:
userid , . .user_id .userIduserID . user_i_d, user_id.
:
MyCustomClass , , .myCustomClass , - , .
/:
my_custom_function , ( ), , , function_custom function_default.my_Custom_Function , . , , , .
, . , . , CSV CSV . , . , - , , , . , , , . , , , .
get_by_username|get_by_email. [$operation, $field]. , . , , - . , , getBy_username, deleteBy_username getBy_firstName. , , . snake, , , , , , . , , , , , , .