Submitted by Cristian Strian (not verified) on Fri, 2005-03-25 16:05.

While the idea is nice, the implementation could use a little optimization.

Instead of simply putting the path in $paths and search for it later with in_array(), I'd rather use the built-in PHP hash tables since they are a lot faster for this job.

self::$paths[$path_file] = true; // store

isset(self::$paths[$path_file]); // query


The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.