macros in PHP
Posted: Thu Dec 02, 2004 10:45 am
Hello
I have the following code which repeats numerous times in my applicaion:
I would like to be able to define a macro called MEM which will translate to the above code.
So I will be able to write code like so:
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
thanks in advance
I have the following code which repeats numerous times in my applicaion:
Code: Select all
$memoryManager->checkMemoryQuota($param1, $param2);So I will be able to write code like so:
Code: Select all
MEM($param1, $params);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
thanks in advance