Sorry to post that here but the zephir forum seems to be a little dead ...
I'm trying to use zephir to make a php extension but there's no possibility to use a variable reference :/ so I don't understand how it possible to make phalcon without using references, ressources must be passed by refrence or become invalid and always make a copy of variables should issue on some memory over usage ?
Is there a way to use references ?


no memory references as far as I know.

its php at the end, i mean if every single byte matters, perhaps c/assembly is a better language for your app ?

I think Phalcon's Di serves as a "kind a" global variable managment, since you can call a service instance from everywhere \Phalcon\Di::getDefault()->get()...

so perhaps you can use a static container for your classes as well and use the same logic ?

As i remember there is some workaround to write c-based code.

@Izopi4a yes, I don't need optimal memory usage but just to not waste it unnecessarily already that php had problems with.
I will try static reference with a main storing object, it would be a solution thx.

@Jurigag Do you know where I can find an example ? I only found a C solution but for php 5