CHttpSession provides session-level data management and configuration. Why can I access session values like arrays after instantiation? {Code...} Read the source code and did not find out why it could be written like this.
CHttpSession provides session-level data management and configuration. Why can I access session values like arrays after instantiation?
$ Session = new CHttpSession; $ session-> open (); $ session ['name1'] = "why"; >>>> why can I write like this?
I read the source code and didn't find out why I could write it like this.
Reply content:
CHttpSession provides session-level data management and configuration. Why can I access session values like arrays after instantiation?
$ Session = new CHttpSession; $ session-> open (); $ session ['name1'] = "why"; >>>> why can I write like this?
I read the source code and didn't find out why I could write it like this.
Because the CHttpSession class implements the ArrayAccess Interface