I just found this out mostly by trial and error, and seem quite chuffed about it.

I have been moaning about PHP lack of deeper functions (Reflection, proper interfaces, generics). I am a C# guy by day and a PHP (CI) guy by night, and the difference in functionality really does get to me at times.

But here is my little code segment - You can have "dynamic " naming of functions like so:

$cat = "meow";
$noise = "cat";

echo $$noise;
//this will give you meow...

Simple stuff I guess, but it just made my life a little bit easier.

Posted in code, php, software at August 7th, 2008. No Comments.