zend custom module
Asked Answered
V

1

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);
}
Votary answered 20/11, 2011 at 17:2 Comment(1)
I will also recommend to download the source and learn from thereGunning
C
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 ;-)

Copyholder answered 20/11, 2011 at 17:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.