Source: Darren's Outpost ( from this entry , this fragment itself )

  1. // function declaration with default value
  2. function foo($bar = 'default value here'){ ... };
  3. // function declaration with passing by reference
  4. function foo(&$bar){ ... };