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
Зарегистрируйся сейчас
или Подпишись на будущие тесты