what best slight removing database connection/object duty php?


a integrate options are:



$connection = {my db connection/object};

function passedin($connection) { ... }

function passedbyreference(&$connection) { ... }

function usingglobal() {
tellurian $connection;
...
}


so, upheld in, upheld reference, controlling global. i'm pondering functions wholly used within 1 digest wholly have 1 database connection. there churned connections, unequivocally upheld passed reference.



i'm thining upheld anxiety indispensable php5 controlling an object, following upheld controlling tellurian 2 possibilities.



the reason i'm seeking since i'm removing sleepy always putting $connection duty parameters.



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?