Could You tell me please, why the result of the code below is not 5 but 6? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 4

Could You tell me please, why the result of the code below is not 5 but 6?

https://code.sololearn.com/wABSm7kc2qUj/?ref=app

20th Aug 2019, 9:30 AM
Egor Tonchev(EGO)
Egor Tonchev(EGO) - avatar
2 ответов
+ 2
If there was a global $b statement above the return statement the output would be 5.
20th Aug 2019, 9:43 AM
Sonic
Sonic - avatar
+ 2
Thank You both
22nd Aug 2019, 7:13 PM
Egor Tonchev(EGO)
Egor Tonchev(EGO) - avatar