Transformation to PHP

this will happen slowly but surely