$ 0 0 Strange... a var_dump($value) show what ? If you use (float)$value, the returned number is correct ?