My function takes an optional parameter, type, which is used to filter through a collection. However, the filter should only apply if the parameter is passed in (in other words, non-null). If the ...
I hear a lot that you should not write functions larger than one screen size, that you should extract things into functions if you call things very often and all these coding guidelines. One of them ...
I am used to Java and therefore always think conditions are interpreted from left to right, i.e. there is a vital difference in null != $obj and $obj != null Now this seems not to be the case with ...