Buyocat Posted June 5, 2007 Share Posted June 5, 2007 I have created a package of utilities written for PHP 5. I would very much appreciate it if any users gave it a try, and even more if they left some feedback. The goal of the tools is to take care of commonly run into problems, but I also want them to be distinct (so you can pick and choose) and simple to understand and use. I believe the target audience is a newcomer to PHP who hasn't already constructed his own tools or adopted larger tools (such as ADODB). There are utilities for database querying, templating, benchmarking to name a few. They're available at sourceforge (linked in my signature) and also from my site (with some sample uses) http://vaultedceilings.net Thanks in advance, Buyo Link to comment https://forums.phpfreaks.com/topic/54210-php-utils/ Share on other sites More sharing options...
utexas_pjm Posted June 8, 2007 Share Posted June 8, 2007 In your IncludeManager class you have the following method: <?php function get($file) { static $previous_includes = array(); if ($previous_includes[$file]) return true; if (!exists($file)) return false; $previous_includes[$file] = true; include(INCLUDE_MANAGER_PATH . $file); return true; } ?> I believe that the following is tautologically equivalent to your code without the added overhead of the $previous_includes hash: <?php function get($file) { return (exists($file) ? include_once(INCLUDE_MANAGER_PATH . $file) : false); } ?> I haven't looked too closely at everything else --but I think you have some good stuff here. On a side note: Are you still looking for some folks to start an open source project? If so, drop me a line. Best, Patrick Link to comment https://forums.phpfreaks.com/topic/54210-php-utils/#findComment-270989 Share on other sites More sharing options...
Buyocat Posted June 9, 2007 Author Share Posted June 9, 2007 Thanks for the reply, the real point of the get method is the hash table. The reason for the hash table is to avoid having to call include_once. Basically it's a trade off between memory for execution speed. Every time you call include_once you break out of execution and do a system call to check whether the file was already included. The hash table takes some extra memory but eliminates the extra system call. Link to comment https://forums.phpfreaks.com/topic/54210-php-utils/#findComment-271244 Share on other sites More sharing options...
tarun Posted June 24, 2007 Share Posted June 24, 2007 Hmmm..... This Account Has Been Suspended Please contact the billing/support department as soon as possible. Seems Your Hosting Has Been Suspended Link to comment https://forums.phpfreaks.com/topic/54210-php-utils/#findComment-281401 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.