PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
which is much shorter
Is it possible in PHP?
It is important to note that function checkMemoryQuota actually takes 3 parameters (the 3rd parameter is optional). I would still like the macro to work without having to define 2 macros
I can also define a global function called TEXT that will do a simple redirect.
But this adds overhead of yet another function call, even though the code does become shorter
I personally prefer to leave it as-is even if the function calls are pretty long strings. It disambiguates the code by not making the user find where the 'macro' came from. Also, as you mentioned, you don't have the overhead of creating some sort of wrapper for this functionality.