To sum up from the article,
PROS:
- Shortens dev. time
- more secured
- pretty coding
- widely supported
- trend (?!) - many people talk about it
CONS:
- Not for complex issue
- Not always necessary
- Not really a "native PHP" training
Rule of thumb: Tabs should be used at the beginning of the line for indentation, while spaces can be used mid-line for alignment.Comma of Array
Note the comma after the last array itemRegex
It’s most convenient to use single-quoted strings for regular expressionsEnd of Line / End of File
Remove trailing whitespace at the end of each line of code. Omitting the closing PHP tag at the end of a file is preferred.SQL Formatting
$wpdb->prepare() is a method that handles escaping, quoting, and int-casting for SQL queries.
- “Fixes bug described in #20″
- “XYZ_Class test() method visibility to public to fix errors in #20″
媽媽傳授: 用爉燭塗在線上縫紉,可以更容易打結,以及拉縫線更順 爸爸傳授: 貼玻璃紙前在玻璃面塗上肥皂水,可以移動玻璃紙不留摺痕