C++ #define in PHP

Soorgeswisord

New Member
I realize that "eval" largely fills the role of the C++ #define feature, but how would I do something like this in PHP:\[code\]#define D(x,y) if (N==x) return(y); else {void Sample(int N) { D(3) D(4) D(22) } }}\[/code\]My problem is that eval("return;") will just return from eval, not from the calling routine. My other problem is parameterizing the macro.
 
Back
Top