Consider following code snippet:
function show() {
    STATIC $count = 0;
    return ++$count;
}
print show();
print show();
print show(); 
What is the result of executing the code above?
Explanation
The result is 123, because we use PRE increment and STATIC variable, that is means the value will be stored after executing show() function;

Слідкуй за CodeGalaxy

Мобільний додаток Beta

Get it on Google Play
Зворотній Зв’язок
Продовжуйте вивчати
тести з PHP
Cosmo
Зареєструйся Зараз
або Підпишись на майбутні тести