Fixed unexpected memory usage caused by PHP extract function