Applied PRG patter first time in php.