reverted php5.2 compatibility changes, moved those to separate branch