11

I am trying to build my own zend module (.so)

We have multiple functionality that can be done in our own module which will improve our performance on a high traffic website (50k+ visits a day).

These are simple module but I was wondering is the language used by zend is similar to C?

How easy is to translate current C code to Zend code?

Example:

I want to check how many nodes I have in a tree:

int nbNodes(Nodes *n, int *err) {
 // count how many nodes a tree has
 // Nodes *n = root of the tree
 *err = 0;
 if(emptyTree(n ,err)) {
  return 0;
 }
 return nbNodes(n->leftSide, err) + nbNodes(n->rightSide, err) +1);
}
Charles
  • 50,943
  • 13
  • 104
  • 142
Erin Tucker
  • 3,274
  • 2
  • 15
  • 22

1 Answers1

15

maybe this can help: http://devzone.zend.com/303/extension-writing-part-i-introduction-to-php-and-zend/

Of course what you see is very similar to c ;-)

maraspin
  • 2,353
  • 20
  • 16