Jump to content

Ultra mega super huge function files


eric1235711

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?
Link to comment
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.
Link to comment
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]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.