Is the PHP language resultantly C?

Spread the love

Question Description

Ok: I edited my question: I heard somewhere that php language is written in C.

So what happens for example when you run a function in php such as date("Ymd"); or file_get_contents("file.txt");?

Does it translate that code to C and request to server, or does php do it?

And if it does translate it and request, that means basically it is C?

Practice As Follows

That is incorrect.

If you mean the language PHP is implemented in, it is C, not C++; see the PHP wikipedia page, under Implementation Language.

That does not, however, mean that it “translates” code to C; PHP is an interpreted language.

While executing code, it does of course have to use functions written in C, since it is itself using C. However, no “translation” into C occurs; the code is simply parsed by the PHP language and the language then calls, itself, what is appropriate.

You might want to read more on interpreted languages, that should give you a better understanding.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.