PHP meledak dan mendapatkan nilai pertama

$beforeDot = array_shift(explode('.', $string));
$beforeDot = current(explode(".", $string));

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