hi guys

I guess yo know all , about the function class_exists which is used to check whether a class is available before creating an instance of it. What i like to know is.. how complex this function is? will it be a good practice using this in some special cases?? Does it affect the performance? as i have other way to do it wihtout using this function. But the code wil be looking good if i use this function. Please tell me your valuable suggessions on this topic

Thanks & regards
AH Aneesh
www.aneesh.net

    Well if you think the first example given on the [man]class_exists[/man] page is complex to use, then yes, it's complex to use.

    Does it affect performance? Not as much as having the code not work at all because you got into a mess of ugly code that is too complicated for you to understand well enough to debug it.

      so you you suggest me to dont use thst function if it is not that much neccessary ?

        I cannot speak for Weedpacket, but personally: I would use it if I intended on creating more than one instance of the same class, if I knew this class was vital to the use of the code, if I planned on coming back to this code years later, if I was using someone else's donated code, or even just for fun.

        Also, I highly doubt that was the point [what you said] Weedpacket was trying to convey.

          Write a Reply...