What is the role of the PHP keyword GLOBAL? Share To: ------ solution --------- PHP keyword GLOBAL, what is the role?
Share:
------ Solution --------------------
Http://www.baidu.com? Tn = sogouie_dg & ie = UTF-8 & bs = PHP % E5 % 85% B3 % E9 % 94% AE % E5 % AD % 97 GLOBAL & f = 8 & rsv_bp = 1 & wd = PHP + GLOBAL & rsv_sug3 = 1 & rsv_sug1 = 1 & rsv_sug4 = 49 & inputT = 352
These are clearer than I said.
------ Solution --------------------
Simply put, a variable has its function scope, that is, you declare a variable, which does not mean that you can use it anytime, anywhere. imagine, you are in a dark room without any doors or windows. your friends are outside the room, but you cannot directly talk to friends in the dark room, because you can't see your friends, you can use your smartphone to communicate with your friends through video, and you can directly talk to your friends, so global is the role of the smartphone in this example.