PHP – find out if variable is set

$kursus = isset($kursus) ? (int)$kursus : 0;