Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

zend custom module

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);
}
like image 641
Erin Tucker Avatar asked Nov 20 '11 17:11

Erin Tucker


1 Answers

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 ;-)

like image 182
maraspin Avatar answered Oct 30 '22 14:10

maraspin