isset, empty & is_null
Në shqip përdoret i njëjti emër.
ShpjegimiSQ
isset($x) kontrollon që variabla ekziston dhe s'është null; empty($x) që është „bosh“ ("", 0, "0", [], null, false); unset($x) e fshin. Shumë të përdorura me $_POST dhe $_GET.
EnglishEN
isset($x) checks the variable exists and isn't null; empty($x) that it's “empty” ("", 0, "0", [], null, false); unset($x) deletes it. Used constantly with $_POST and $_GET.
Si ta mendosh
Si të kontrollosh nëse sirtari ekziston, dhe nëse ka diçka brenda.
Lexoje në anglisht
Like checking whether the drawer exists, and whether there's anything in it.
Shembull kodiphp
if (isset($_GET['faqe'])) $faqe = (int) $_GET['faqe'];
if (empty($emri)) echo "Shkruaj emrin!";