php 5.2.* support + functions renamed

Signed-off-by: Peter <pitzy@siteup.ro>