PHP Functions preloaded like Coldfusion CFC's?

TechBoyJK

Lifer
Oct 17, 2002
16,699
60
91
In CF Server, you can create .cfc, which are coldfusion components.

They are basically preloaded user-defined functions that get compiled when the server boots up.

I'm googling around, I'm not struggling to find where PHP offers similar.

Do I just need to make a .php document which a bunch of functions, and simply include the file at the top of my documents that will need to use these functions?
 

TechBoyJK

Lifer
Oct 17, 2002
16,699
60
91
Usually, I believe PHP is an interpreted language. So you can't pre-compile functions.

But that depends on your server system. I haven't used any of these.

Thanks.

I was under impression that CFML is also an interpreted language, but I also suppose that's why the precompiled user defined functions require a different document extension.

normal coldfusion is .cfm but the components are declared in .cfc's.

Would I be correct that .cfm files are interpreted, but that .cfc's are not?
 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,610
4,530
75
Honestly, I don't know the first thing about Cold Fusion. I assumed there was compilation going on because you said, in the OP, that certain functions get compiled.