eric1235711 Posted September 15, 2006 Share Posted September 15, 2006 Here where I´m working there are is a single functions file called 'general.php' with more than 9000 lines. It also includes other function files... :-XThere are almost all the functions (not general functions are there too)...won´t it overcharge the server or will it not do a lot of useless processing? And won´t it put a lot of trash in the server´s memory? Quote Link to comment https://forums.phpfreaks.com/topic/20863-ultra-mega-super-huge-function-files/ Share on other sites More sharing options...
eric1235711 Posted September 15, 2006 Author Share Posted September 15, 2006 help Quote Link to comment https://forums.phpfreaks.com/topic/20863-ultra-mega-super-huge-function-files/#findComment-92478 Share on other sites More sharing options...
bholbrook Posted September 15, 2006 Share Posted September 15, 2006 sounds like you need to read up on classes.we write classes in excess of 100,000 lines without performance degrading Quote Link to comment https://forums.phpfreaks.com/topic/20863-ultra-mega-super-huge-function-files/#findComment-92587 Share on other sites More sharing options...
Ninjakreborn Posted September 15, 2006 Share Posted September 15, 2006 those functions shouldn't really hurt anything. Classes are very good, very helpful, if yuo want to learn how to do them, there not that hard. Having that many functions just says you have a lot of reusable code, you could probably cut that in half if you converted everything over to OOP. it would probably help server some, but other than that you should be fine. Just call them when you need them. Well only include them if you need them. Quote Link to comment https://forums.phpfreaks.com/topic/20863-ultra-mega-super-huge-function-files/#findComment-92590 Share on other sites More sharing options...
eric1235711 Posted September 15, 2006 Author Share Posted September 15, 2006 [quote author=bholbrook link=topic=108173.msg435071#msg435071 date=1158344734]sounds like you need to read up on classes.we write classes in excess of 100,000 lines without performance degrading[/quote]sorry... I didn´t know, ok... :'( Quote Link to comment https://forums.phpfreaks.com/topic/20863-ultra-mega-super-huge-function-files/#findComment-92648 Share on other sites More sharing options...
eric1235711 Posted September 15, 2006 Author Share Posted September 15, 2006 [quote author=businessman332211 link=topic=108173.msg435074#msg435074 date=1158344833]those functions shouldn't really hurt anything. Classes are very good, very helpful, if yuo want to learn how to do them, there not that hard. Having that many functions just says you have a lot of reusable code, you could probably cut that in half if you converted everything over to OOP. it would probably help server some, but other than that you should be fine. Just call them when you need them. Well only include them if you need them.[/quote]You're saying about things like this?[code]<?phpclass myclass{ myfunct1(){ } myfunct2(){ } // (...) myfuncN(){ }}myclass::myfunct1();//etc?>[code]I use it in my own codes...[/code][/code] Quote Link to comment https://forums.phpfreaks.com/topic/20863-ultra-mega-super-huge-function-files/#findComment-92654 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.