📜  php 爆炸并获得第一个值 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:40.745000             🧑  作者: Mango

代码示例1
$beforeDot = array_shift(explode('.', $string));
$beforeDot = current(explode(".", $string));

// PHP <= 5.3:
$beforeDot = explode(".", $string);
$beforeDot = $beforeDot[0];