Local Variable:-
Local Variables mean local is declared inside a function. Its value applies in any function. When local variable value modified in one function then changes not apply in other function changes apply in particular function.
PHP- Global Variable:-
Global Variable means that Global that declared from outside of the function. It is created before the function’s execution starts and lost when the function switch. When you want to access global function in function then add global in function then access global from inside a function.
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I am working at Cotocus. I blog tech insights at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at I reviewed , and SEO strategies at Wizbrand.
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at PINTEREST
Rajesh Kumar at QUORA
Rajesh Kumar at WIZBRAND