Skip to content

B ‐ [WEB] ‐ 04 ‐ PHP

GoodM4ven edited this page Apr 28, 2024 · 7 revisions

+75% of the servers' pretty much, are PHP scripted; just saying!

Tips

Helper Methods

  • Use $words = array_filter($words) method to quickly get rid of empty strings within like ($words = ["", "word1", "", "word2"]).

Best Practices

  • Whenever there is inheritance (extends) and constants, or static methods are to be dealt with, please use static:: over self:: to avoid missing the correct usage.

Coding Style

  • If long conditions are to be split spilling over the next two lines or so, make sure to have || or && at the beginning of subsequent lines.