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;

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Cosmo
Sign Up Now
or Subscribe for future quizzes