I suck at writing PHP extensions

to be honest, this is my first one ever :p