Federico Cargnelutti

Simple is better than complex. Complex is better than complicated. | @fedecarg

Zend Framework: Autoloading for better Performance

with 3 comments

Many discussions have come up in the recent past about how ZF should increase the libraries base throughput. One of the suggestions that comes up is whether or not requiring the autoloader, and consequently removing calls to require_once, is a good thing.

The following posts explore these possibilities:

Advertisement

Written by Federico

November 1, 2008 at 9:25 pm

Posted in Frameworks, PHP

3 Responses

Subscribe to comments with RSS.

  1. In my codes I use something like this:
    if (class_exists(‘NameSpace_SomeClass’)){
    require ‘NameSpace/SomeClass.php’;
    }
    My observations are that this is better (as performance) than require_once.

    Radoslav Stankov

    November 1, 2008 at 10:19 pm

  2. Remember to set the second argument of class_exists() to false.

    Federico

    November 2, 2008 at 12:04 pm

  3. I suppose it should be something like:
    if (!class_exists(‘NameSpace_SomeClass’, false)){
    require ‘NameSpace/SomeClass.php’;
    }

    Marco

    November 3, 2008 at 11:01 am


Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

Please log in to WordPress.com to post a comment to your blog.

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 43 other followers