concept program in category php

This is an excerpt from Manning's book PHP in Action: Objects, Design, Agility.
Static typing means that the compiler checks the types of variables before the program runs. To make this possible, the programmer must tell the compiler which variables are supposed to belong to which types. In Java, you have to explicitly name the types of all instance variables, temporary variables, return values, and method arguments. In PHP, a dynamically typed language, no such declarations are necessary.
The idea of static typing is that it provides type safety. It’s harder to introduce the wrong content into a variable because the content is likely to be of the wrong type, and in a statically typed language, the compiler will catch that during compilation. So some bugs in a program will be caught at compile time.
I tend to think that the threshold is low. I find that writing classes helps me even when the program is relatively small and simple. Object-oriented programming makes it easier to decompose the program into parts, and since you have to name the parts—the classes—it’s easier to see what those parts are doing. You can do that with plain functions for a while, but as the functions multiply, it becomes harder to keep track of all of them.
Programs are harder to read than the average mystery novel or newspaper article. Plain English (or any other natural language we might happen to know) is inherently easy to understand because we’re built to understand natural languages and have been practicing the skill since infancy. No matter how much of a geek you are, programs will always be harder to read than plain text. But we can take advantage of our built-in abilities by making program code read more like plain English. Helping us is the fact that object-oriented code has nouns (objects) and verbs (methods) just like natural languages. Making code nearly as readable as ordinary prose is a tall order; it’s rarely achieved, and it's not always necessary or even desirable. But we can take some steps in that direction.