|
Re: Why printf?
PHP is an interpreted language, but C is compiled. In C, everything in between the quotes is stored verbatim in the binary image that gets executed. By the time the program is compiled, your program no longer knows what the variable names were so it could not parse the variables out of the string. Even if it did know the variable names, it would need special knowledge of where the variable was actually stored.
I can't think of any way that it would even be possible to do this in C without doing some pre-processing before it got to the compiler.
|