PHP Tricks and Best Practices?
shaunxcode: fluent expressions (when uses appropriately) can be great for constructing DSLs. Also any time you see boiler plate code take the time to refactor to eliminate it - often times figuring out how to do that will make new abstractions apparent. As a matter of practice search for the coolest things you can do in python (list comprehensions etc.), lisp and ruby and figure out how to do things in a similar way (if possible) in php.Such as:  //python version:
  noprimes = [j for i in range(2, 8) for j in range(i*2, 50, i)]
  primes = [x for x in range(2, 50) if x not in noprimes]

  //phparrayplus version:
  $noprimes = xR(2,8)->for_each('xR($x*2,50,$x)->out()')->flatten();
  $primes = xR(2,50)->diff($noprimes);

  //common lisp:
  (loop for x from 0 to 100 if (> (* x x) 3) collect (* 2 x))

  //phparrayplus version:
  $C = xR(100)->if_only('($x*$x) > 3')->for_each('2*$x');

  //factorial in phparrayplus, nothing else to compare this too  - just cool:
  function fac($n){
    return xR(1,$n)->reduce('$x*$y'); 
  }