Calling C Function

How to call a C function within PHP?

Questions by tonmoytewary

Showing Answers 1 - 3 of 3 Answers

vikas1284

  • Mar 12th, 2009
 

We can call some of the C functions from PHP
like printf(), fputs(), fwrite(), fgetc(), exit() and so many others.

but we cannot call all of C functions, for example we cannot call initgraph() function that is a part of turbo C and I don't think that there is any way to call custom C functions from PHP.

Perhaps it will need a very high level of C programming to create DLLs and include them as a PHP module or PEAR or plugin or whatever suits good.

nigenet

  • Apr 21st, 2009
 

This is not strictly true.

PHP has many native functions that have the same name as C functions, and which act in similar ways, but they are not C functions, they are PHP functions.

abc

  • Sep 12th, 2011
 

This is not strictly true.

PHP has many native functions that have the same name as C functions, and which act in similar ways, but they are not C functions, they are PHP functions.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions