+ 3
A loosely typed language refers to the syntax of the language. The syntax is not as strict, as opposed to Java or C, but is loose, because it does not require you to declare variable types. Because of this, a PHP can contain any type of data in a single variable, whereas in Java, it can only contain the type it was defined as. PHP: $myVar = 5; //legal $myVar = "Hello World!"; //Also legal Java: int myVar; //type definition myVar = 5; //legal myVar = "Hello World!"; //NOT legal. Won't compile
5th Jun 2016, 3:57 PM
Gabe Rust
Gabe Rust - avatar