fist cut of PHP code.