Name binding

In programming languages, name binding is the association of entities (data and/or code) with identifiers. An identifier bound to an object is said to reference that object. Machine languages have no built-in notion of identifiers, but name-object bindings as a service and notation for the programmer is implemented by programming languages. Binding is intimately connected with scoping, as scope determines which names bind to which objects – at which locations in the program code (lexically) and in which one of the possible execution paths (temporally).
Use of an identifier codice_1 in a context that establishes a binding for codice_1 is called a binding (or
defining) occurrence. In all other occurrences (e.g., in expressions, assignments, and subprogram calls), an identifier stands for what it is bound to; such occurrences are called applied occurrences.
Binding time.
An example of a static binding is a direct C function call: the function referenced by the identifier cannot change at runtime.
But an example of dynamic binding is dynamic dispatch, as in a C++ virtual method call. Since the specific type of a polymorphic object is not known before runtime (in general), the executed function is dynamically bound. Take, for example, the following Java code:
public void foo(java.util.List<String> list) {
 list.add("bar");
codice_3 is an interface, so codice_4 must refer to a subtype of it. Is it a reference to a codice_5, an codice_6, or some other subtype of codice_3? The actual method referenced by codice_8 is not known until runtime. In C, such an instance of dynamic binding may be a call to a function pointed to by a variable or expression of a function pointer type whose value is unknown until it actually gets evaluated at run-time.
Rebinding and mutation.
Rebinding should not be confused with mutation.
Consider the following Java code:
LinkedList<String> list;
list = new LinkedList<String>();
list.add("foo");
list = null;
The identifier codice_4 initially references nothing (it is uninitialized); it is then rebound to reference an object (a linked list of strings). The linked list referenced by codice_4 is then mutated, adding a string to the list. Lastly, codice_4 is rebound to codice_12.
Late static.
Late static binding is a variant of binding somewhere between static and dynamic binding. Consider the following PHP example:
class A
 public static $word = "hello";
class B extends A
 public static $word = "bye";
B::hello();
In this example, the PHP interpreter binds the keyword codice_13 inside codice_14 to class codice_15, and so the call to codice_16 produces the string "hello". If the semantics of codice_17 had been based on late static binding, then the result would have been "bye".
Beginning with PHP version 5.3, late static binding is supported. Specifically, if codice_17 in the above were changed to codice_19 as shown in the following block, where the keyword codice_20 would only be bound at runtime, then the result of the call to codice_16 would be "bye":
class A
 public static $word = "hello";
class B extends A
 public static $word = "bye";
B::hello();