※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 125.227.144.199
※ 文章網址: https://www.ptt.cc/bbs/PHP/M.1434600207.A.4A8.html
請問一下各位大大, 在物件導向的架構下,
使用靜態變數和全域變數有什麼差異嗎?
Ex : public static $user1 = "";
global $user1; $user2 = "";
它們不都是會被配置一塊記憶體永久保存, 直到程式執行結束嗎?
兩者有不同嗎?
--