andrewsmd - 1:04 pm on Sep 24, 2013 (gmt 0)
Well for that matter, you can just not pass in anything and make sure warnings are turned off and it'll still work. I never was a fan of not passing in every var into functions or defining the same function and overloading them. I always thought it made things too difficult to debug. I.e. if someone is looking at my code and they see fetchRows($sql) and then fetchRows($sql, $arr) they'd wonder what happens and have to look at the function. If you're always passing in $arr or null, then it's pretty obvious that you're passing nothing with null. Just a personal preference though.