fixed memory leak when using magic casting functions like __toInteger
fixed memory leak when using magic casting functions like __toInteger

sjinks/PHP-CPP,dreamsxin/PHP-CPP,sjinks/PHP-CPP,carlmcdade/PHP-CPP,sjinks/PHP-CPP,sjinks/PHP-CPP,carlmcdade/PHP-CPP,CopernicaMarketingSoftware/PHP-CPP-LEGACY,CopernicaMarketingSoftware/PHP-CPP-LEGACY,CopernicaMarketingSoftware/PHP-CPP,CopernicaMarketingSoftware/PHP-CPP,carlmcdade/PHP-CPP,dreamsxin/PHP-CPP,carlmcdade/PHP-CPP