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

Definitionپێناسە

A variable created outside all functions, in the . In Python a function can read it but must declare global name before assigning to it; in PHP a function needs global $name; or $GLOBALS['name'] even to read it.

کە لە دەرەوەی هەموو کردارەکان، لە ، دروست دەکرێت. لە Pythonـدا دەتوانێت بیخوێنێتەوە، بەڵام پێش دانانی نرخ تێیدا دەبێت global name بنووسێت؛ لە PHPـدا تەنانەت بۆ خوێندنەوەشی global $name; یان $GLOBALS['name'] پێویستە.

Exampleنموونە

global lets the function change the outside $count.

global ڕێگە دەدات گۆڕاوی دەرەکیی $count بگۆڕێت.

$count = 0;
function addOne() {
    global $count;
    $count++;
}
addOne();
echo $count; // 1

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

گۆڕاوی گلۆباڵ، گۆڕاوە گشتییەکە، گۆڕاوە گشتییەکان، گۆڕاوێکی گشتی

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

Videosڤیدیۆکان

PHP Variable Scopes - Static Variables - Full PHP 8 TutorialProgram With Gio · Englishئینگلیزی · 53K viewsبینین · 2.4K likesلایک · Partبەشی 1:41–3:13 (ofلە 5:41)
Why You Shouldn't Use the Global Keyword in PythonTech With Tim · Englishئینگلیزی · 50K viewsبینین · 2.2K likesلایک · Partبەشی 14:03–17:58 (ofلە 17:58)
Python variable scope 🔬Bro Code · Englishئینگلیزی · 42K viewsبینین · 2.1K likesلایک · Partبەشی 1:13–3:52 (ofلە 3:52)
PHP Tutorial (& MySQL) #14 - Variable ScopeNet Ninja · Englishئینگلیزی · 66K viewsبینین · 1.3K likesلایک · Partبەشی 2:27–5:08 (ofلە 8:57)

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