sorenchr Posted May 11, 2008 Share Posted May 11, 2008 Hi, Suppose i have 3 php files in which a function called getUserlist(similar in all) gets used. Would it do any good, besides space preserving, to store this function in a php file for itself, and then call it in the 3 files? Im thinking about memory usage and such. Best regards Soren Link to comment https://forums.phpfreaks.com/topic/105125-storing-functions-in-seperate-files/ Share on other sites More sharing options...
litebearer Posted May 11, 2008 Share Posted May 11, 2008 By storing commonly used functions, routines, even html/css/etc in 'special' files the major benefit is you only need to make changes to one file rather than a multitude. Link to comment https://forums.phpfreaks.com/topic/105125-storing-functions-in-seperate-files/#findComment-538221 Share on other sites More sharing options...
jazz Posted May 11, 2008 Share Posted May 11, 2008 It is like asking if it creates problems in the speed of your car if you wear heavy clothes as you drive. Well, yes you might see a decrease of abut 0.00001 miles/sec but then, do you really care? Link to comment https://forums.phpfreaks.com/topic/105125-storing-functions-in-seperate-files/#findComment-538223 Share on other sites More sharing options...
RichardRotterdam Posted May 11, 2008 Share Posted May 11, 2008 memory usage isnt an issue but its a lot cleaner if you use includes and a lot more maintainable Link to comment https://forums.phpfreaks.com/topic/105125-storing-functions-in-seperate-files/#findComment-538243 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.