fix memory corruption

using memcpy() for writing into a passed string argument is bad, mmkay?
Merge pull request #5 from tony2001/master

Critical memory corruption fix. May lead to unpredictable behaviour in your PHP code: variable/constant disappearing et cetera.