+ 13
Help explain quiz
pls someone explain working of this code below func myf($i = 1) { static $id = 58; $id - = $i; echo $id; } myf(); myf(1); myf(-1); answer = 10099100
11 Réponses
+ 4
SL is failing very much :-(
+ 11
yes!
+ 10
hey Michal
declare Static $id = 101 and check it??
+ 10
yes @daniel
I too don't know exactly
weirdest qsn ever in SL
+ 9
The answer to the above code is 575657 as u said Michal
+ 5
my output (php7 ubuntu64) is:
575657
note that static variable is initialized only in first call of function:
http://php.net/manual/en/language.variables.scope.php#language.variables.scope.static
+ 5
Prudhvi our last challenge, in 4 question, could you explain me that correct answer? SL not give us an answer
+ 4
Something strange but without answer is the "right answer" 8-0
+ 2
101 outputs 10099100