[UPHPU] require_once vs. class_exists

Scott Mattocks scott at crisscott.com
Fri Apr 18 11:05:08 MDT 2008


Rusty Keele wrote:
> I am using PHP 5.2.5, and I recently created a new class that will store database login credentials such as hostname, username and password.

require_once should be sufficient for your needs. The call to 
class_exists isn't going to save you enough to make the potential for 
bugs introduced by it, to make it worth it.

Scott Mattocks


More information about the UPHPU mailing list