1. Glossaryفەرهەنگی زاراوەکان
Global scope
مەودای گشتی
Proposed Kurdish term — under reviewزاراوەی پێشنیارکراو — لە ژێر پێداچوونەوەدایە

Definitionپێناسە

The scope of the main program, outside every function. A Python function can read global variables but needs global name to change them; a PHP function sees them only through global or $GLOBALS.

بەرنامە سەرەکییەکەیە، لە دەرەوەی هەموو کردارەکان. Python دەتوانێت بخوێنێتەوە بەڵام بۆ گۆڕینیان پێویستی بە global name هەیە؛ کردارێکی PHP تەنها بە global یان $GLOBALS دەیانبینێت.

Exampleنموونە

Without global $site; the function would not see $site.

بەبێ global $site;، گۆڕاوی $site نابینێت.

$site = "CêIT"; // global
function show() {
    global $site;
    echo $site;
}
show(); // CêIT

Other Kurdish renderings in useوەرگێڕانە کوردییەکانی تر

مەودای گلۆباڵ، مەودا گشتییەکە، مەودا گشتییەکان، مەودایەکی گشتی

Related termsزاراوە پەیوەندیدارەکان

Videosڤیدیۆکان

Python Tutorial: Variable Scope - Understanding the LEGB rule and global/nonlocal statementsCorey Schafer · Englishئینگلیزی · 414K viewsبینین · 12K likesلایک · Partبەشی 1:31–7:07 (ofلە 20:58)
PHP Variable Scopes - Static Variables - Full PHP 8 TutorialProgram With Gio · Englishئینگلیزی · 53K viewsبینین · 2.4K likesلایک · Partبەشی 0:25–1:00 (ofلە 5:41)
PHP Tutorial (& MySQL) #14 - Variable ScopeNet Ninja · Englishئینگلیزی · 66K viewsبینین · 1.3K likesلایک · Partبەشی 2:27–5:08 (ofلە 8:57)

Learn more inزیاتر فێربە لە