I know many will call this micro optimizing, yes it is that but it is also good to know things like this. Now my question, in my first example below you will see I have a variable set that contains a mysql query then I have another line that runs a function with the above variables mysql query. In my 2nd example I do it all in 1 line, I assume there is no real speed gain but possibly this would help lower memory usage?
//example 1
$sql= 'UPDATE users SET setting_online=0 WHERE user_id=' .$_SESSION['user_id'];
Database::executeQuery($sql);
//example 2
Database::executeQuery('UPDATE users SET setting_online=0 WHERE user_id=' .$_SESSION['user_id']);