Converting php code base to hack