php: better way to name variables - because you want to be understood
2009-07-21
IN1, 2009-07-21 09:22:29
IN1, 2023-07-25 21:09:34


I would like to share how I have been naming variables for many years: camelCase prefixed with a leading letter, which gives a hint about the data type.

This style resembles the so-called Hungarian notation, but not completely.

boolean

// leading $b for boolean type
$bSuccess = true;

integer


Benennung von Dateien
2009-03-17
IN1, 2009-03-17 00:00:00
IN1, 2023-04-10 14:16:27


Zusammenfassend hier die Regeln für gute Dateinamen

  • ISO-Datum voranstellen - im Format JAHR-MONAT-TAG (Bsp.: 2008-03-17 anstatt "17.03.2008")
  • Statt Leerzeichen bitte Unterstrich _ verwenden.
  • Keine Sonderzeichen 
  • Umlaute bitte ausformulieren - Bsp.: ä>ae, Ä>Ae, […]


This website uses Cookies to provide you with the best possible service. Please see our Privacy Policy for more information. Click the check box below to accept cookies. Then confirm with a click on "Save".