Hi. Sorry for yet another OT post in this thread.
Josh Davis wrote:
I have a question about 3. Where in a script can you use the "use" statement? Could it be used inside conditionals? For example, if ($testing) { use class testing::PDO; } else { use class ::PDO; }
I hope this is a badly chosen example, as code should never behave seperately when under test as compared to production. Use dependency injection to feed a mock object, but don't do this.
Regards, Karsten -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php