Finally, computer-science theorists tweak and redesign languages to make them better able to express complex ideas and more efficiently communicate tasks to be performed. In a functional language, a function describes how input is converted to output. Input a filename from the user. Now print out that filename. Get down and give me 50 . . . .
Declarative languages emphasize the statement of the problem.
In a declarative language, the programmer creates a general algorithm, for instance, an economic simulation. Object-oriented languages create virtual objects, like a window or a document, and then communicate with the objects through interfaces. The point of the objects is to modularize and simplify the programming. All you need to do is give him commands. PHP, as we will see, combines elements of functional and imperative languages.