我有一些字符串需要转换为浮点数,但已经看到了两种明显不同的方法:
$float = floatval ($float);
和
$float = (float) $float;
这两种方法有什么区别吗?
php casting
casting ×1
php ×1