Reading Zend Engine API code: What does ## (double hash) mean?

Seh Hui Leong picture Seh Hui Leong · Mar 17, 2009 · Viewed 9.6k times · Source

Out of curiousity, I'm reading the Zend Engine API code and encountered quite a number of ## in their #define's. For example, at /usr/lib/php5/Zend/zend_API.h:

#define ZEND_FN(name) zif_##name
#define ZEND_MN(name) zim_##name

What does the ## (double hash) symbols mean in these two lines?

Answer

Ronny Vindenes picture Ronny Vindenes · Mar 17, 2009

The ## concatenates what's before the ## with what's after it. So in your example doing ZEND_FN(foo) would result in zif_foo