Jump to content

Archived

This topic is now archived and is closed to further replies.

eric1235711

Ultra mega super huge function files

Recommended Posts

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...  :-X

There 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?

Share this post


Link to post
Share on other sites
sounds like you need to read up on classes.

we write classes in excess of 100,000 lines without performance degrading

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
[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... :'(

Share this post


Link to post
Share on other sites
[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]
<?php

class myclass{
  myfunct1(){
  }
  myfunct2(){
  }
  // (...)
  myfuncN(){
  }
}

myclass::myfunct1();
//etc

?>
[code]

I use it in my own codes...[/code][/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.