vendredi 19 août 2016

Preprocessing like "#if defined" in PHP

I have following question:

I am programming a SOAP Server application with PHP. But I have to do that in two different ways, one which is for external usage (for all people) and one that is just for an import. And the import application has just a little bit more possibilities, but else it is the same.

In C I would write something like this (using the preprocessor):

#ifdef INTERNAL
int funktion( int ok, double asdfg, const char *aaa){
#else
int funktion( int ok, double asdfg){
#endif
    return 0;
}

I know the function defined() in PHP, but it does not really do what I want to do (I think). But is there something simolar?

Of course I could write two different applications, but it would be very great if there was something like this ...

Thank you for help!

Kind regards!




Aucun commentaire:

Enregistrer un commentaire