Open distums opened 7 years ago
静态/动态类型表示变量是否与类型绑定
String str = "Hello"; //statically typed as string str = 5; //would throw an error since java is statically typed
str = "Hello" # it is a string str = 5 # now it is an integer; perfectly OK
强/弱类型表示是否允许类型间的隐式转换
str = 5 + "hello" # would throw an error since it does not want to cast one type to the other implicitly.
$str = 5 + "hello"; // equals 5 because "hello" is implicitly casted to 0 // PHP is weakly typed, thus is a very forgiving language.
静态/动态类型表示变量是否与类型绑定
强/弱类型表示是否允许类型间的隐式转换